Advertisement
imk0tter

Untitled

May 4th, 2014
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3.  
  4. Write a recursive function that prints the numbers 1 to X back to 1.
  5.  
  6. * The function must only have one int input.
  7. * The function must consist of a single function
  8. * The function must not use loops
  9. * The function must not use static or global variables.
  10. * The function must use printf("%i\n",..) to print the numbers
  11.  
  12.  
  13. */
  14.  
  15. #include <stdio.h>
  16.  
  17. void f (int x);
  18.  
  19. int main(int argsv, char ** argsc)
  20. {
  21.     printf("Testing an input value of 35");
  22.     f(35);
  23.     printf("Finished testing an input value of 35");
  24.     return 0;
  25. }
  26.  
  27. void f(int x)
  28. {
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement