Kali ini kita akan mencoba program pengulangan menggunakan while do
Berikut coding program :
#include
<iostream>
#include
<conio.h>
/* run this
program using the console pauser or add your own getch,
system("pause") or input loop */
using namespace
stint main() {
int y=1;
do
{
cout<<"nilai
y :"<<y<<endl;
y=y+1;
}while(y<10);
return 0;
}
Hasilnya Sebagai Berikut :
0 comments:
Post a Comment