Advertisement
SuperKirchik

Untitled

Mar 30th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5. int main()
  6. {
  7.     int a;
  8.     cin >> a;
  9.     cout << (a / 100) + ((a % 100) / 10) + (a % 10) << endl;
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement