Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
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. int main(void){
  4. int n, noOfRows, i, spaces, noOfSpaces, hashes;
  5. noOfRows = 8;
  6. noOfSpaces = noOfRows-1;
  7. do{
  8. n=get_int("Give Mario an Integer : ");
  9. }
  10. while(n<0 || n>23);
  11.  
  12. for(i=1; i<noOfRows; i++){
  13. for(spaces=0; spaces<=noOfSpaces; spaces++){
  14. printf(" ");
  15. }
  16. noOfSpaces--;
  17. for(hashes=0;hashes<=i;hashes++){
  18.  
  19. printf("#");
  20.  
  21. }
  22.  
  23. printf("\n");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement