Numbers equal or not Program in C
WAP that checks whether the two numbers entered by the user are equal or not.
#include<stdio.h>
/*6. WAP that checks whether the two numbers entered by the user are equal or not. */
void main()
{
int a,b;
printf("Enter a=");
scanf("%d",&a);
printf("Enter b=");
scanf("%d",&b);
if(a==b)
{
printf("\na and b are equal.");
}
else
{
printf("\na and b are not equal.");
}
}
Output:
Enter a=10 Enter b=12 a and b are not equal.c language tutorial learn c language study c language