Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
454 B
2
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
    int a, c;
    int b = 0;
    int d = 0;
    cin >> a;
    cin >> c;
    int f = a;
    int g = c;
    while (a != 0) {
        a /= 10;
        b += 1;
    }
    while (c != 0) {
        c /= 10;
        d += 1;
    }
    if (b < d) {
        int u = (f * 10) + g % 10;
        cout << u;
    }
    else {
        int y = (g * 10) + f % 10;
        cout << y;
    }
}