Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- string a;
- string b;
- cin >> a;
- cin >> b;
- if (a.size() > b.size())
- {
- cout << "a=" << a << endl;
- }
- else
- {
- if (a.size() < b.size())
- {
- cout << "b=" << b << endl;
- }
- else
- {
- for (int i = 0; i < a.size(); i++)
- {
- if (a[i] > b[i])
- {
- cout << "a=" << a << endl;
- return 0;
- }
- if (a[i] < b[i])
- {
- cout << "b=" << b << endl;
- return 0;
- }
- }
- cout << "EQUALS";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement