The part of the assignment that I can not figure out is:
"use a nested loop for the patterns. In the inner loop you may use an if structure to determine what to print on each line."
The pattern I need to make is attached. So Far I am able to collect the data and I have the validation loops, but I can not make the pattern.
I know it will be something like this:
int row,col;
Any ideas to help me form the loops to generate the patterns?Code://printing the pattern to the screen
for (row=1;row<=5;row++)
{
for (col=1;col<=5;col++)
{
//if the column is less than or equal to the row -> print (*)
//else -> print a space ( )
if(col<=row)
{
printf ("*");
}
else
{
printf (" ");
}
}
printf ("\n");
}

