Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string znach;
- cin >> znach;
- int n = znach.size();
- if (znach[0] == '-')
- {
- cout << znach[0];
- for (int i = 1; i < n; i++)
- cout << znach[i] - 48;
- }
- else for (int i = 0; i < n; i++)
- cout << znach[i] - 48;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement