Hi all.
I am new in C language. I am learning to program by using C for my first step. Now I am reading a chapter about looping (while, for, do.. while, nested loop).
In my exercise book, the question is about to:
Using nested loop to print out this one,
But, I managed to print like this one,
by using this code,
#include <stdio.h>
int main(void)
{
int x;
int y;
for(x=1; x<=5; ++x)
{
for(y=x; y<=5; ++y)
{
printf("*");
}
printf("\n");
}
return 0;
}
How can I print out like a first one??
Thank you.
P/s: Sorry for my bad English.