Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cs50.h>
- #include <stdio.h>
- int main(void)
- {
- while (true)
- {
- int n = get_int("Please type in desired height: ");
- if (n < 1)
- {
- continue;
- }
- else if (n > 8)
- {
- continue;
- }
- else
- {
- for (int j = 0; j < n; j++)
- {
- printf("#\n");
- }
- break;
- }
- }
- }#include <cs50.h>
- #include <stdio.h>
- int main(void)
- {
- while (true)
- {
- int n = get_int("Please type in desired height: ");
- if (n < 1)
- {
- continue;
- }
- else if (n > 8)
- {
- continue;
- }
- else
- {
- for (int j = 0; j < n; j++)
- {
- printf("#\n");
- }
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement