Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.13 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.      char x; int sum=0;
  6.      while((x=getchar())!='!')sum+=x;
  7.      printf("%d",sum);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement