Kodenya seperti berikut.
#include <stdio.h>
#include <conio.h>
int main()
{
int n, i, j;
printf("masukkan jumlah baris: \n");
scanf("%i", &n);
for (i= 1; i<=n; i++){
for (j=1; j<=i; j++){
printf("*");
}
printf("\n");
}
getch();
return 0;
}
Selamat mencoba!
0 comments:
Post a Comment