Created
June 10, 2019 19:08
-
-
Save dmlebron/80cd6cbd0fa0c3fbf1fb0df22d1ba098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(void) | |
{ | |
int h = get_positive_int("Height: "); // ask height and store it as i | |
printf("Stored: %i\n", h); //confirm value | |
for (int k = 1; k <= h; k++) | |
{ | |
for (int i = 1; i <= (h-k); i++) | |
{ | |
printf("."); | |
} | |
for (int j = 1; j <= k; j++) | |
{ | |
printf("#"); | |
} | |
printf("\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment