Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. //
  2. //
  3. // ®€""
  4. // ŧŧ oOOOOOo“
  5. // !¢¢ OOOOOOOOOOo««
  6. // My first programm @@@LOOOOOOOO“”~µµµ
  7. // As Mario_Half_Pyramid, in Pset1 ŧŧ ©ªªª©© OOOOOOORRTđðª/ @@
  8. // in Language-C \@@ ## IL TGTGGHTH
  9. // @@@/ #### TTgTTG“”/ _________
  10. // by Richard Paul Oliver IL ###### ŧŧŧŧŧ©¢» | CHECK |
  11. // Richie ################### DR. ©© ””””||”””
  12. // MARIO ©©©© ||
  13. // Presents ŧŧ←←←←←←←←~~~~~~~““
  14.  
  15. #include<stdio.h>
  16. #include<cs50.h>
  17.  
  18. int main(void)
  19. {
  20.  
  21. int height;
  22.  
  23.  
  24. do
  25.  
  26. {
  27.  
  28. // This Prints the Question out towards the User //
  29.  
  30. printf("Complete your Pyramid with a positive integer between 0 and 23:\n");
  31.  
  32.  
  33. // This gathers the Information needed for within the Programs understandmet //
  34.  
  35. height = GetInt();
  36.  
  37.  
  38. }
  39. // Obtains Users Input , Checks the condition if met Repeats, if Not Terminates Loop!!
  40.  
  41. while((height < 0) || (height > 23));
  42.  
  43.  
  44. // This intiates the for Loop //
  45.  
  46. for(int i = 1; i <= height; i++)
  47.  
  48.  
  49. // It Prints the correct spaces given within each line, //
  50. // continuously udating untill the given height is reached..//
  51.  
  52. for(int j = height - i; j > 0; j--)
  53. {
  54.  
  55. printf(" ");
  56.  
  57. }
  58.  
  59. // Prints the given upper 2 hashes and continuously //
  60. // Updates untill amount reached for User.. //
  61.  
  62. for(int k = 0; k <= i; k++)
  63. GetInt();
  64. {
  65. printf("#");
  66.  
  67.  
  68. // Prints a New_Line, after each set of Hash & Space is situated //
  69.  
  70. printf("\n");
  71. }
  72. // Thanks the User for the correct Input //
  73.  
  74. printf("Thankyou for Playing Mario's Pyramid\n");
  75.  
  76.  
  77. return 0;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement