1
1
WHILE
#include <iostream.h>
int main() {
int j=10;
int k;
while(j>=1){
k=1;
while(k<=j){
cout<<k*j<<' ';
k++;
}
cout<<endl;
j--;
}
return 0;
}
#include <iostream.h>
int main ()
{
unsigned long n;
do {
cout << "masukkan nomor: ";
cin >> n;
cout << "anda memasukkan: " << n << "\n";
} while (n != 0);
return 0;
}
us i ng Sys t em ;
namespace or g . go t do t ne t . o t ak
{
cl ass Con t ohWh i l e
{
pub l i c st a t i c vo i d Mai n ()
{
in t i = 0
; wh il e ( i
<10 )
{
i f ( i%2==0 )
{
Conso l e . W r i t eL i ne ( " Angka genap : "+i);
}
i += 1 ;
}
Conso l e . ReadL i ne () ;
}
}
}
SOAL