Catatan Minggu 1

Perulangan Interatif, dan pengkondisian

soal conditional
1. jika saya punya uang 10.000 saya makan jika tdk saya berpuasa
int uang;
if(uang>10000){
cout<<"saya akan makan;cout<<endl;
else{
cout<<"Berpuasa";}}
2. mencetak bilangan 1-10 perulangan
dengan
- for(int = 1; i<=10; i++){
cout<<i;}
- int i=1;
while(i<=10){
cout<<"i = "<<i;
i++;
}
- int i=1;
do{
cout<<i;i++;
while (i<=10)}




Share this:

ABOUT THE AUTHOR

Hello We are OddThemes, Our name came from the fact that we are UNIQUE. We specialize in designing premium looking fully customizable highly responsive blogger templates. We at OddThemes do carry a philosophy that: Nothing Is Impossible

0 komentar:

Posting Komentar