diff options
Diffstat (limited to 'total.c')
-rw-r--r-- | total.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#include <stdio.h> + +int main(int argc, char*argv[]) +{ + int tot=0; + char s[128]; + + gets(s); + while(!feof(stdin)) + { + tot+=atoi(s); + gets(s); + } + + printf("%d\n",tot); +} |