Q:-Write a C program to accept two integers and check whether they are equal or not
In this C program we are accepting two integers using scanf and comparing both the input integer value and comparing them if they are equal or not using if-else. If the integer value are equal we will receive output Number1 and Number2 are equal. Otherwise the output will say Number1 and Number2 are not equal
#include<stdio.h> #include<conio.h> void main() { int num1, num2; clrscr(); printf("Input the values for Number1 : "); scanf("%d", num1); printf("Input the values for Number2 : "); scanf("%d", num2); if (num1 == num2) printf("Number1 and Number2 are equal\n"); else printf("Number1 and Number2 are not equal\n"); getch(); }