int main(){
int i,j,n;
printf("masukan nilai n: "); //masukan nilai
scanf("%d",&n); //membaca masukan berupa integer
for (i=1;i<=n;i++){
for (j=1;j<=n-i;j++) {
printf(" ");
}
for (j=1;j<=2*i-1;j++){
printf("*");
}
printf("\n");
}
}
int i,j,n;
printf("masukan nilai n: "); //masukan nilai
scanf("%d",&n); //membaca masukan berupa integer
for (i=1;i<=n;i++){
for (j=1;j<=n-i;j++) {
printf(" ");
}
for (j=1;j<=2*i-1;j++){
printf("*");
}
printf("\n");
}
}
No comments:
Post a Comment