1. /* Chapter, Question 19
  2. Emmet Doyle
  3. 28/2/12
  4. */
  5.  
  6. #include<stdio.h>
  7.  
  8. void counting(void);
  9.  
  10. main()
  11. {
  12. int i;
  13. int amount;
  14.  
  15. printf("How many numbers would you like to print?\n\n");
  16. scanf("%d", &amount);
  17.  
  18. printf("\n\n");
  19.  
  20. for (i=0; i<amount; i++)
  21. counting();
  22.  
  23. }
  24.  
  25. void counting()
  26. {
  27. static int num = 1;
  28.  
  29. printf("%d\n",num);
  30. num += 1;
  31. }