// create variables to store the numbers
int first, second;
// read in the first numbers
cin >> first;
// output the first number
cout << first;
// loop through the numbers as they are inputed
while(cin >> second) {
// check all the possibilities
if(first < second) cout << "<";
else if(first > second) cout << ">";
else cout << "=";
cout << second;
first = second;
// go back around again
}
3
solved C++ User inputs 4 numbers and the program check them which are greater which are less than [closed]