f Tutorial Pemrograman C++ dan Java: TUGAS PIRAMID

TUGAS PIRAMID


#include
#include

int main()
{
int x,y,z,bil;
clrscr();

cout<<"Masukkan angka: "; cin>>bil;
cout<<"\n\n"; for(x=1; x<=bil; x++) { for(z=bil; z>=x; z--)
cout<<" "; for(z=x;z<2*x;z++) { y=z%10; cout<=x; z--)
{
y = z%10;
cout<
}
cout<<"\n";
}
getch();
}

0 komentar:

Posting Komentar