Untitled

das
 avatar
user_0563559
c_cpp
a year ago
450 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
    int num1, num2;

    int tnum2 = 0;
    int tnum1 = 0;

    cin >> num1;
    cin >> num2;

    int snum1 = num1;
    int snum2 = num2;

    while (num1 != 0)
       num1 /= 10;
        tnum2 += 1;
    
    while (num2 != 0) 
        num2 /= 10;
        tnum1 += 1;
    
    if (tnum2 < tnum1) 
        cout << snum2;
    
    else 
        cout << snum1;
    
}