josiftepe

Untitled

Oct 18th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     // korisnikot vnesuva broj n, i go pecatime prviot broj koj e deliv so 10
  8.     int n;
  9.     cin >> n;
  10.     int x = n + 10;
  11.     while(n <= x) {
  12.         if(n % 10 == 0) {
  13.             cout << n << endl;
  14.             break;
  15.         }
  16.         n += 1;
  17.     }
  18.     cout << "zdravo" << endl;
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment