diff options
| author | mo khan <mo@mokhan.ca> | 2014-07-20 19:44:30 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-07-20 19:44:30 -0600 |
| commit | 0eadb61bdce7552e2f1a64aea79cee3be0e9fe23 (patch) | |
| tree | 6df1d3cc23ee259b87983cc8b834e3066c2f68e5 | |
| parent | 93569fdf640e2c03cee1a92d292ea6c6fc9e73c9 (diff) | |
add input example.
| -rw-r--r-- | input.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#include <stdio.h> +#include <string.h> + +int main(int argc, const char *argv[]) +{ + char message[20]; + int count, i; + + strcpy(message, "Hello, world!"); + printf("Repeat how many times?"); + scanf("%d", &count); + + for (i = 0; i < count; i++) { + printf("%3d - %s\n", i, message); + } + + return 0; +} |
