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