compare two integers in c

Solutions on MaxInterview for compare two integers in c by the best coders in the world

showing results for - "compare two integers in c"
Rebeca
19 Mar 2018
1#include <stdio.h>
2
3
4int main() {
5   int a, b;
6 printf("Enter number a : ");
7    scanf("%d", &a); 
8 printf("Enter number b : ");
9    scanf("%d", &b); 
10
11   if(a > b)
12      printf("a is greater than b");
13   else
14      printf("a is not greater than b");
15
16   return 0;
17}