Program to check wether a number is greater than or less than other number
#include <iostream>
using namespace std;
int main()
{
int num1, num2;
cout << "Enter value for num1:"; cin >> num1;
cout << "Enter value for num2: "; cin >> num2;
if (num1 > num2)
cout << "Num1 is greater than num 2\n";
else
cout <<"num1 is smaller than num 2\n";
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int num1, num2;
cout << "Enter value for num1:"; cin >> num1;
cout << "Enter value for num2: "; cin >> num2;
if (num1 > num2)
cout << "Num1 is greater than num 2\n";
else
cout <<"num1 is smaller than num 2\n";
return 0;
}