#include
#include
int n,i,j,x,y;
void main()
{
clrscr();
cout<<"masukkan bilangan: "; x=40 ; y=5;
cin>>n; gotoxy(x,y);
for (i=1; i<=n;i++)
{
for(j=1; j<=i;j++)
{
if(i==1)
{
cout << "=";
}
else if (j==1)
{
cout<<">";
}
else if (j==i)
{
cout<<" <";
}
else
{
cout<<" *";
}
delay(150);
}
x--; y++;
gotoxy(x,y);
}
for (i=n; i>=1;i--)
{
for(j=1; j<=i;j++)
{
if(i==1)
{
cout << " =";
}
else
{
cout<<" +";
}
delay(150);
}
x++; y++;
gotoxy(x,y);
}
getch();
}
thanks ya ilmuxa
BalasHapussama-sama kawan,,,
BalasHapusjangan sungkan-sungkan untuk berbagi ilmu,, :)