Program Menghitung Segitiga

Written by

in

#include

int main()
{
int jumlah;
cout < < "BERAPA TINGGI SEGITIGA = "; cin >> jumlah;

for (int i=1; i<= jumlah;i++) { for(int j=1; j<=i; j++) { cout<< "*"; } cout<< "\n"; } return 0 ; }

Comments

2 responses to “Program Menghitung Segitiga”

  1. fandi haryanto Avatar
    fandi haryanto

    Contoh program :
    10+8+6+4+2 =30
    10+8+6+4 =28
    10+8+6 =24
    10+8 =18
    10 =10

    mas tlong buatin program yang hasil cetaknya seperti di atas…..
    please………….

  2. M. Ricco Avatar
    M. Ricco

    syntax nya beda banget ma Visual basic ya

Leave a Reply