Sunday, 15 December 2013

C Program to Accept two Integers and Check if they are Equal

#include < stdio.h>
void main()
{
    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");
    else
        printf("M and N are not equal\n");
}

Output

 Enter the values  for  M and N
 3   3 
M and N are equal
   
Enter the values  for  M and N
 5   8 
M and N are not equal

For More Details Please Visit Ictjobs.info

No comments: