I have a problem for school , I could really use some help on, I needed to make a loop that would print a block of asteriks 10 x 10, then I need to break the block down into a triangle like somy problem is the next step I need a loop that will printCode:int main(int argc, char *argv[])
{
{
int x;
int y;
for ( x=0; x<=9; x++)
{
for (y=x-0;y <=9; ++y){
printf("*"); }
printf("\n");
}
}
return 0;
}
I realized the only way is to add spaces, problem is I dont know how to add spaces to a loop yet, they should line up and be squared, but I cant get them to stay lined up when I post this.Code:**********
*********
********
*******
******
*****
****
***
**
*
thx for any help,
btw, notice i used the code box this time lol