In this program,I will tell you how to input two numbers from the user and then determine whether they are equal or not?
#include<iostream.h>
#include<conio.h>
void main( )
{
int m,n;
cout<<"Enter the first number=";
cin>>m;
cout<<"Enter the second number=";
cin>>n;
if(m==n)
cout<<"The numbers are equal.";
else
cout<<"The numbers are not equal.";
getch( );
}
Source code
#include<iostream.h>
#include<conio.h>
void main( )
{
int m,n;
cout<<"Enter the first number=";
cin>>m;
cout<<"Enter the second number=";
cin>>n;
if(m==n)
cout<<"The numbers are equal.";
else
cout<<"The numbers are not equal.";
getch( );
}
No comments:
Post a Comment