#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x,y,z;
printf("SILAHKAN MASUKAN JUMLAH YANG DIINGINKAN
: ");scanf("%d",&x);
printf("\n");
for(x;x>=1;x--)
{for(y=1;y<=x;y++)
{printf("* ");}
printf("\n");}
getch();
}
Contoh tampilan :
SILAHKAN MASUKAN JUMLAH YANG DIINGINKAN
: 5
*
**
***
****
*****
No comments:
Post a Comment