Saturday, 13 December 2014

C program to check for equal digits

Write a program to find whether a variable is equal to another variable (Using Simple if statement)


#include<stdio.h>
#include<conio.h>
int main()
{
int a, b;
clrscr();
printf("Enter the two digits");
scanf("%d %d",&a, &b);
if(a==b)
printf("The entered digits are Equal");
getch();
return(0);
}

OUTPUT:
Enter the two digits
2 2
The digits are Equal

No comments:

Post a Comment