Users Online

· Guests Online: 21

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

06 C Program to Accept two Integers and Check if they are Equal

This C Program accepts two integers and check if they are equal. The program accepts 2 integer values, checks whether 2 value are equal or not. If the 2 values are equal, display they are equal.
Here is source code of the C program to accepts two integers and check if they are equal. The C program is successfully compiled and run on a Linux system. The program output is also shown below.

/*
* C program to accept two integers and check if they are equal
*/
#include
void main()
{
int m, n;

printf("Enter the values for M and N\n");
scanf("%d %d", &m, &n);
if (m == n)
printf("M and N are equal\n");
else
printf("M and N are not equal\n");
}

$ cc pgm74.c
$ a.out
Enter the values for M and N
3 3
M and N are equal
$ a.out
Enter the values for M and N
5 8
M and N are not equal

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.75 seconds
10,800,465 unique visits