Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- int main()
- {
- string MESSAGE;
- getline(cin, MESSAGE);
- int n=0;
- int x=0;
- while (n<MESSAGE.size()){
- x += MESSAGE[n];
- ++n;
- }
- cout<<x<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment