From 954af9179665457b40453a0417ddf5b3949a0449 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 4 Mar 2007 18:35:36 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r2, which included commits to RCS files with non-trunk default branches. --- total.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 total.c (limited to 'total.c') diff --git a/total.c b/total.c new file mode 100644 index 0000000..bfdd7d0 --- /dev/null +++ b/total.c @@ -0,0 +1,16 @@ +#include + +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); +} -- cgit v1.2.3