eolymp
bolt
Try our new interface for solving problems
Problems

Next number 2

published at 1/9/24, 6:30:20 pm

include<iostream>

include<cmath>

using namespace std; int main() { long long n,a,s,i; cin>>n; for (i=0;i<=10;i++) { n++; if(n%10==0) break;

}
cout<<n;

}

published at 1/23/24, 6:25:32 pm

include <iostream>

using namespace std; int main() { int n; cin >> n; while (true) {

    if (n % 10 != 0) {
        n = n + 1;
    }
    else if (n % 10 == 0) {

        cout << n;
        break;
    }
}

}