Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char char_array[128];
- int i = 0, ch, sum = 0;
- while(true){
- ch = getchar();
- if(ch == '\n')
- break;
- sum = sum * 10 + (ch - '0');
- }
- printf("%d", sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement