#include "stdafx.h"
#include "conio.h"
#include "iostream"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{ int i , j , k, l ;
cout<<"Masukan tinggi piramid = ";cin>>l;
for(i=l;i>=0;i--)
{
for(j=i;j>=0;j--)
{
cout<<" ";
}
for(k=1;k<=l-i;k++)
{
cout<<"*";
}
for(k=1;k<l-i;k++)
{
cout<<"*";
}
cout<<endl;
}
cout<<endl<<endl;
cout<<"********************************************************"<<endl;
cout<<" http://victolearning.blogspot.co.id/ "<<endl;
cout<<"********************************************************"<<endl;
_getch();
return 0;
}
Maka Akan didapatkan Tampilan Program sbb :
Semoga bermanfaat dan Berguna , Terimakasih.
Jangan Lupa Like ,Share dan comment :)
Jangan Lupa Like ,Share dan comment :)
Tidak ada komentar:
Posting Komentar