sahajjain01

11.Input two numbers and print the greater number.

Aug 16th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. //Program to input two numbers and print the greater number.
  2. #include<stdio.h>
  3. #include<conio.h>
  4.  
  5. void main()
  6. {
  7.     int number_1, number_2;
  8.  
  9.     clrscr();
  10.  
  11.     printf("Enter two numbers: ");
  12.     scanf("%d%d", &number_1, &number_2);
  13.  
  14.     if(number_1 > number_2)
  15.         printf("The greater number is: %d", number_1);
  16.     else
  17.         printf("The greater number is: %d", number_2);
  18.  
  19.     getch();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment