Answer» hey! i got a PROBLEM with understand this program.
Code: [Select]#include <stdio.h> main() { int LIG; /* nombre de lignes */ int L; /* compteur des lignes */ int ESP; /* nombre d'espaces */ int I; /* compteur des caractères */
do { printf("Nombres de lignes : "); SCANF("%d", &LIG); } while (LIG<1 || LIG>20); for (L=0 ; L<LIG ; L++) { ESP = LIG-L-1; for (I=0 ; I<ESP ; I++) putchar(' '); for (I=0 ; I<2*L+1 ; I++) //i don't understand this line putchar('*'); putchar('\n'); } RETURN 0; }
but if possible you can explain me in detail how codes here work. thank for your contribution.I am not sure either. The USE of { and } is not clear.
|