CONTOH PROGRAM MENGHITUNG HARI DENGANPERULANGAN DO WHILE C++

#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;

int main(int argc, char** argv) {

int i=1;
while (i<5){
cout<<"Minggu ke - "<<i<<endl;
int j=1;
while (j<=7){
cout<<"Hari = "<<j;
j++;
}
cout<<endl;
i++;
}

return 0;
}


Selamat mencoba :)

Comments