Program Menghitung Segitiga


#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 ; }


2 responses to “Program Menghitung Segitiga”

  1. 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………….

Leave a Reply