Advertisement
cawchamp

Untitled

Oct 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. /* This is my program of mario - by Casper Hansen */
  2.  
  3. #include <stdio.h>
  4. #include <cs50.h>
  5.  
  6. int main(void)
  7. {
  8. int h, j, v;
  9.  
  10. do
  11. {
  12. printf("how height \n");
  13. printf("Height:");
  14. h = GetInt();
  15. }
  16. while (h<0 || h>23 );
  17. for (j=h+1; j>=2; j--)
  18. {
  19. for (v =2; v<=h+2; v++)
  20. if (v < j)
  21. printf(" ");
  22. else
  23. printf("#");
  24. printf("\n");
  25. }
  26. return 0;
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement