Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Chapter, Question 19
- Emmet Doyle
- 28/2/12
- */
- #include<stdio.h>
- void counting(void);
- main()
- {
- int i;
- int amount;
- printf("How many numbers would you like to print?\n\n");
- scanf("%d", &amount);
- printf("\n\n");
- for (i=0; i<amount; i++)
- counting();
- }
- void counting()
- {
- static int num = 1;
- printf("%d\n",num);
- num += 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement