Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void squares (void);
  4.  
  5. int main ()
  6. {
  7. int n;
  8. squares ();
  9. return 0;
  10.  
  11. printf ("Please enter a variable for n\n");
  12. fflush (stdout);
  13. scanf ("%d", &n);
  14. for (n=1; squares<=n; n++) {
  15. printf ("%d\n",n);
  16.  
  17. }
  18.  
  19. }
  20.  
  21. void squares (void)
  22. {
  23. int i;
  24. for (i=1; i<=10; i++) {
  25. printf ("The square of %i is %i.\n", i, i*i);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement