Happy About the progress

This commit is contained in:
2026-05-28 10:16:10 +00:00
commit 79415e38db
92 changed files with 1326 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#include <cs50.h>
#include <stdio.h>
void draw(int n);
int main(void)
{
int height = get_int("Height; ");
draw(height);
}
void draw(int n)
{
// Base case, making sure loop has exit condition.
if (n <= 0)
{
return;
}
// Print a pyramid of height n -1
draw (n-1);
// Print one more row
for (int i =0; i < n; i++)
{
printf("#");
}
printf("\n");
}