Blogger templates

Pages

Friday, 20 April 2012

C Program: Enter Two Numbers and Check both Numbers Equal or Not

C program

Write a program to Enter the values of Two Numbers and check wheather Two Numbers are 
Equal or Not :

#include<stdio.h>
#include<conio.h>
main()
{
int m,n;

clrscr();
printf(" Enter the values of M and N:");
scanf("%d" ,&m,&n);  
if(M==N)
printf(" M and N are equal");
else
printf(" M and N are not equal");
} // End of main() function //

Output1:
Enter the values of M and N:
5
6
M and N are not equal

Output2:
// Output1 is cleared by the clrscr() function //
Enter the values of M and N:
9
9
M and N are equal




0 comments:

Post a Comment