Happy About the progress
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
#include <cs50.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Prototype
|
||||
void draw(int n);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int height = get_int("Height: ");
|
||||
draw (height);
|
||||
|
||||
}
|
||||
// Prototype now being used.
|
||||
void draw(int n)
|
||||
{
|
||||
// for each row of pyramid
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
for (int j = 0; j < i; j++)
|
||||
{
|
||||
printf("#");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user