Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include<conio.h>
- int main()
- {
- int i, spasi, baris, k=0;
- printf("Masukkan jumlah baris : ");
- scanf("%d",&baris);
- for(i=1; i<=baris; i++)
- {
- for(spasi=1; spasi<=(baris-i); spasi++)
- {
- printf(" ");
- }
- while(k!=(2*i-1))
- {
- printf("* ");
- k++;
- }
- k=0;
- printf("\n");
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment