Advertisement
Josif_tepe

Untitled

Mar 16th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string s;
  8.     cin >> s;
  9.     int number = 0;
  10.     for(int i = 0; i < s.size(); i++) {
  11.         number = (number * 10) + (s[i] - '0');
  12.     }
  13.     cout << number << endl;
  14.     return 0;
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement