Write a program to take two numbers as input and print their difference if the first number is greater than the second number otherwise print their sum.
#include <iostream>
using namespace std;
int main()
{
int N1, N2, sub, add;
cin >> N1;
cin >> N2;
if (N1 > N2)
{
sub = N1 - N2;
cout << sub;
}
else
add = N1 + N2;
cout << add;
}