Advertisement
Josif_tepe

Untitled

Jan 24th, 2024
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int x;
  6.     cin >> x;
  7.    
  8.     int ostatok = x % 10;
  9.     if(ostatok == 0) {
  10.         cout << 0 << endl;
  11.     }
  12.     else {
  13.         cout << 10 - ostatok << endl;
  14.     }
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement