Rabu, 07 Desember 2016

Contoh program c++ perulangan dengan while

Ini adalah salah satu contoh perulangan bertingkat dengan while menggunakan program CodeBlocks

#include <iostream>
using namespace std;
int main(){
    int i, j, k;
    cout<<"masukkan jumlah baris : ";
    cin>>k;
    i=1;
    while(i<=k)
    {
    j=1;    while(j<=i)
    {
        cout<<"*";
        j++;
    }
        cout<<"\n";
        i++;
    }
    return 0;
}

yang muncul

Share This :    Facebook Twitter Google+

1 komentar:

  1. The Casino Near DC - MapyRO
    The 충청남도 출장안마 Casino at Harrah's Philadelphia is located in 익산 출장안마 the center of The Water Club, the closest Casino to The Water Club. This casino is located 천안 출장마사지 a 광주 출장마사지 mile away from 강릉 출장마사지

    BalasHapus