Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #include <cs50.h>
  2. #include <stdio.h>
  3.  
  4. int main(void)
  5. {
  6. while (true)
  7. {
  8. int n = get_int("Please type in desired height: ");
  9. if (n < 1)
  10. {
  11. continue;
  12. }
  13. else if (n > 8)
  14. {
  15. continue;
  16. }
  17. else
  18. {
  19. for (int j = 0; j < n; j++)
  20. {
  21. printf("#\n");
  22. }
  23. break;
  24. }
  25. }
  26.  
  27. }#include <cs50.h>
  28. #include <stdio.h>
  29.  
  30. int main(void)
  31. {
  32. while (true)
  33. {
  34. int n = get_int("Please type in desired height: ");
  35. if (n < 1)
  36. {
  37. continue;
  38. }
  39. else if (n > 8)
  40. {
  41. continue;
  42. }
  43. else
  44. {
  45. for (int j = 0; j < n; j++)
  46. {
  47. printf("#\n");
  48. }
  49. break;
  50. }
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement