diff options
Diffstat (limited to '1.c')
| -rw-r--r-- | 1.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <stdio.h> + +int main(void) +{ + char buff[80]; + int last = -1; + int count = 0; + + while(fgets(buff, sizeof buff, stdin)) + { + int i = atoi(buff); + + if (last != -1 && last < i) + { + printf("%d\n", i); + count++; + } + + last = i; + } + + printf("count=%d\n", count); + + return 0; +} |
