-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilip.cpp
More file actions
78 lines (47 loc) · 926 Bytes
/
Copy pathFilip.cpp
File metadata and controls
78 lines (47 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <bits/stdc++.h>
/*
*/
using namespace std;
//int flip(string number){
// int len, value;
//
// //len = number.length();
//
// reverse(number.begin(), number.end());
//
// value = atoi(number); //having error here
//
// return value;
//
//}
int main(void){
int num1;
int num2;
int number_1,number_2;
string first,second;
cin >> num1 >> num2;
first = to_string(num1); //convert int to string
//number_1 = flip(first);
second = to_string(num2); //convert int to string
//number_2 = flip(second);
reverse(first.begin(), first.end());
reverse(second.begin(), second.end());
if (first > second){
cout << first;
}
else{
cout << second;
}
// if (number_1 > number_2){
//
// cout << number_1;
//
//
// }
// else{
//
// cout << number_2;
// }
//
return 0;
}