diff options
Diffstat (limited to 'reference/C/CONTRIB/OR_PRACTICAL_C/08_1.c')
-rw-r--r-- | reference/C/CONTRIB/OR_PRACTICAL_C/08_1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/reference/C/CONTRIB/OR_PRACTICAL_C/08_1.c b/reference/C/CONTRIB/OR_PRACTICAL_C/08_1.c new file mode 100644 index 0000000..5cd2c0d --- /dev/null +++ b/reference/C/CONTRIB/OR_PRACTICAL_C/08_1.c @@ -0,0 +1,15 @@ +#include <stdio.h> + +main() { + int counter; /* loop counter */ + for (counter = 0; counter < 3; counter++) { + int temporary = 1; + static int permanent = 1; + + (void)printf("Temporary %d Permanent %d\n", + temporary, permanent); + temporary++; + permanent++; + } + return (0); +} |