CHATGPT AI
universe
.com

#include <stdio.h>

int main()
{
int num1, num2;

printf("Enter two integers: "); // prompt user to enter two integers
scanf("%d %d", &num1, &num2); // read two integers from user

// check if both numbers are equal or not
if (num1 == num2)
printf("%d and %d are equal\n", num1, num2); // print if both numbers are equal

else // if both numbers are not equal then check which number is greater
(num1 > num2) ? printf("%d is greater than %d\n", num1, num2):printf("%d is greater than %d\n", num2, num1);

return 0; // return 0 to operating system indicating program ran successfully
}
.com #include <stdio.h> int main() { int num1, num2; printf("Enter two integers: "); // prompt user to enter two integers scanf("%d %d", &num1, &num2); // read two integers from user // check if both numbers are equal or not if (num1 == num2) printf("%d and %d are equal\n", num1, num2); // print if both numbers are equal else // if both numbers are not equal then check which number is greater (num1 > num2) ? printf("%d is greater than %d\n", num1, num2):printf("%d is greater than %d\n", num2, num1); return 0; // return 0 to operating system indicating program ran successfully }
0 Comments & Tags 0 condivisioni 1 Views

Password Copied!

Please Wait....