Guest User

Untitled

a guest
Nov 28th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. /**
  9. * Auto-generated code below aims at helping you parse
  10. * the standard input according to the problem statement.
  11. **/
  12. int main()
  13. {
  14. string MESSAGE;
  15. getline(cin, MESSAGE);
  16. int n=0;
  17. int x=0;
  18. while (n<MESSAGE.size()){
  19. x += MESSAGE[n];
  20. ++n;
  21. }
  22. cout<<x<<endl;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment