Berlangganan

About Me


contoh 29

// program membentuk segitiga
# include <iostream.h>

void main()
{
  int tinggi,
        baris,
        kolom;

    cout<<"tinggi segitiga : ";
    cin>>tinggi;

    cout<<endl;
    {
    for(kolom = 1; kolom <= baris; kolom++)
    cout<<'*';
    cout<<endl;
    }
}

output

*****************
  ***************
   *************
    ***********
     *********
      *******
       *****
        ***
         *

0 Response to "contoh 29"

Post a Comment