Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <math.h>
- #include <iomanip>
- #include <cstdio>
- #include <string>
- using namespace std;
- int main() {
- string name1, name2;
- int age1, age2;
- cin >> name1;
- cin >> age1;
- cin >> name2;
- cin >> age2;
- if(age1 == age2){
- printf("Idades iguais\n");
- return 0;
- }
- if(age1 > age2){
- printf("%s\n", name1.c_str());
- return 0;
- }
- else{
- printf("%s\n", name2.c_str());
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement