Disini saya akan menjelaskan tentang script/coding program turbo C++
#include<iostream.h>
void main()
{
int t,b,k;
cout<<"==================================="<<endl;
cout<<"Pembuatan Segitiga......0651-12-236"<<endl;
cout<<" Muhammad Fadlan Mubarok "<<endl;
cout<<"==================================="<<endl;
cout<<"Masukkan Tinggi Segitiga:"<<endl;
cin>>t;
for(b=1;b<=t;b++)
{
for(k=1;k<=b;k++)
if(b%2==0)
cout<<k;
else
cout<<"*";
cout<<"\n";
}
for (b=(t-1);b>=1;b--)
{
for(k=b;k>=1;k--)
if(b%2==0)
cout<<k;
else
cout<<"*";
cout<<"\n";
}
cout<<"=============================="<<endl;
cout<<"Selesai....... Selamat Mencoba"<<endl;
cout<<"=============================="<<endl;
}
jika anda ingin mendownload programnya klik gambar diatas
Subscribe to:
Post Comments (Atom)
0 komentar:
Post a Comment