Sabtu, 29 September 2012

program piramid

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int f,u,a,d;

cout<<"Masukkan nilai Segitiga :";
cin>>d;
cout<<endl;

for (f=d;f>=0;f--)
{
for(u=f;u>=0;u--)
{
cout<<" ";
}

for(a=0;a<=d-f;a++)
{
cout<<"*";
}
for(a=0;a<d-f;a++)
{
cout<<"*";
}
cout<<endl;
}


    system("pause");
    return 0;
}



fahmi,s blogPosted By Fahmi's BLog

Semoga informasi yang Fahmi's sampaikan sangat bermanfaat bagi Kita semua contact me

Thank You

0 komentar:

Posting Komentar