Advertisement
Alx09

Mono probelma divizbilitate

Mar 6th, 2022
1,232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin >> n;
  9.     int lenght_n = 0, copyN = n;
  10.     while(copyN)
  11. {
  12.     lenght_n++;
  13.     copyN /= 10;
  14. }
  15.    cout << n;
  16.     n -= lenght_n;
  17.    while(n) {
  18.         cout << 0;
  19.    --n;
  20.    }
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement