Home / Programs / Write a program in C to check whether the two given numbers are equal.
Programming Example

Write a program in C to check whether the two given numbers are equal.

👁 1,136 Views
💻 Practical Program
📘 Step by Step Learning
Write, program in C, check whether, two given numbers , equal.

Program Code

#include <stdio.h>
int main()
{
	int a=2, b=3;
	if(a == b)
		printf("EQUAL");
	else
		printf("UNEQUAL");
		
	getch();	
	return 0;
}

Output

UNEQUAL

Explanation

None

How to learn from this program

First read the algorithm, then study the program code line by line. After that, compare the code with the output and finally go through the explanation. This approach helps learners understand both the logic and the implementation properly.