isuranja
Member level 5
I want get following result using nested loop in C.
*
**
***
****
*****
******
*******
********
*********
**********
This is my code but it's not working please do advice.
#include <stdio.h>
main()
{
int i;
int j;
i = 1;
j = 1;
while( i <= 10) {
printf("*");
i = i + 1;
while( j <= 10) {
printf("*/n");
j = j + 1;
}
}
}
Please help on this.
Thanks,
Isuranja
*
**
***
****
*****
******
*******
********
*********
**********
This is my code but it's not working please do advice.
#include <stdio.h>
main()
{
int i;
int j;
i = 1;
j = 1;
while( i <= 10) {
printf("*");
i = i + 1;
while( j <= 10) {
printf("*/n");
j = j + 1;
}
}
}
Please help on this.
Thanks,
Isuranja