Postingan

for di c++

#include <iostream> using namespace std; main(){     cout <<"\n   PROGRAM BANGUN DATAR";     cout <<"\n============================";     cout <<endl<<endl;     int pilih,p,l,n;     cout <<"\n1.PERSEGI PANJANG";     cout <<"\n2.SEGITIGA";     cout <<"\nPILIH(1-2):";cin>>pilih;     if (pilih==1){         cout<<"\n   PERSEGI PANJANG";         cout <<"\n=====================";         cout<<"\nMASUKAN LEBAR:";cin>>p;         cout<<"\nMASUKAN PANJANG:";cin>>l;             cout<<endl;             for(int j=1; j<=p; j++){             for(int i = 1; i<=l; i++){             cout ...