Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Enter two numbers: " << endl;
- int num1 = 0, num2 = 0;
- cin >> num1;
- cin >> num2;
- int max = (num1 > num2) ? num1 : num2; // what is going on here, somekind of list comprehension
- cout << "The greater number is: " << max << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment