Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int firstage, secondage;
- cout << "Enter your first age: ";
- cin >> firstage;
- cout << "Enter your second age: ";
- cin >> secondage;
- if (firstage > secondage) {
- cout << firstage << " > " << secondage << endl;
- }
- else if (secondage > firstage) {
- cout << secondage << " > " << firstage << endl;
- }
- else if (firstage > 100 && secondage > 100) {
- cout << firstage << " and " << secondage << " are both over 100"<< endl;
- }
- else {
- cout << firstage << " = " << secondage << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement