Pages

Thursday, February 11, 2016

C Program to find bigger number.

#include<stdio.h>
int main()
{
int num1, num2;

  printf("Enter number1:");
  scanf("%d",&num1);

  printf("Enter number2:");
  scanf("%d",&num2);
  if(num1 > num2)
  {
    printf("Number1 is big.");
  }
  if(num2 > num1)
  {
    printf("Number2 is big.");
  }
  if(num1 == num2)
  {
    printf("Number1 and Number2 are equal.");
  }
    return 0;
}
/*
Enter number1:5
Enter number2:7
Number2 is big.
*/

No comments:

Post a Comment