Write a program that print the relation between two integer number if those numbers are equal, not equal and which one contain the higher value.
#include <stdio.h>
int main()
{
int a, b;
printf("First integer: ");
scanf("%d", &a);
printf("Second integer: ");
scanf("%d", &b);
if (a == b)
printf("Equal");
else {
printf("Not equal; ");
if (a > b)
printf("first contains higher value");
else
printf("second contains higher value");
}
return 0;
}
Comments
Leave a comment