os/p/c2/main.c
2019-06-14 20:04:43 +02:00

16 lines
233 B
C

#include <stdio.h>
int main(void)
{
int input, sum = 0;
puts("Press CTRL+D to stop reading");
while (scanf("%i", &input) != EOF)
sum += input;
puts("-- sum --");
printf("%d\n", sum);
return (0);
}