Loading...

Wednesday 9 November 2011

MEMBUAT BINTANG LANCIP BAWAH DENGAN WHILE

#include <conio>
#include <iostream>

void main()
{

int x=1,y;
clrscr();
while(x<=4)
{
y=4;
while (y>=x)
{cout<<"*";y=y-1;}
cout<<"\n";
x=x+1;
}
getch();
}

Output program:
****
***
**
*

0 comments: