Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (C) 2013, xerpi
- */
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int suma = 0;
- for (int i = 0; i < 3; ++i) {
- suma += n%10;
- n /= 10;
- }
- cout << suma << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement