Here is source code of the C program to accepts two integers and check if they are equal. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
* C program to accept two integers and check if they are equal
int m, n;
printf("Enter the values for M and N\n");
scanf("%d %d", &m, &n);
if (m == n)
printf("M and N are equal\n");
printf("M and N are not equal\n");
$ cc pgm74.c $ a.out Enter the values for M and N 3 3 M and N are equal $ a.out Enter the values for M and N 5 8 M and N are not equal
Sanfoundry Global Education & Learning Series – 1000 C Programs.