Stadion Piala Dunia 2018

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Karim Benzema

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Group-group Piala Dunia 2018

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Cristiano Ronaldo

PORTUGAL.

PIALA DUNIA RUSIA 2018

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Red Yellow Electricity Lightning

Tuesday, October 23, 2018

Belajar Pembuatan Kalkulator Sederhana

Nama : Leonardo Butar Butar
Nim: 5160311082
Kelas : SI.B
  v  Algorytma :
        Bilangan 1 : real
        Bilangan 2 : real
        Hasil          : real
        Pilih          : integer
Algoritma :
      Read(bilangan1,bilangan2)
      Write(“menu operator”)
     Write(“1. Penambahan”)
     Write(“2. Pengurangan”)
     Write(“3. Pembagian”)
     Write(“4. Perkalian”)
     Read(pilih)
   
     Depend On pilihan
          1 :hasil=bilangan1+bilangan2
          2 :hasil=bilangan1-bilangan2
          3 :hasil=bilangan1/bilangan2
          4 :hasil=bilangan1*bilangan2
     EndDepend
     Write(hasil)

 v  Flowchart



  v  Pseudo Code
#include<iostream.h>
#include<conio.h>
int main()
{
double nilai1;
double nilai2;
double hasil;
char jwb, op;
do{
cout<<”===kalkulator sederhana===\n” << endl;
cout << “Masukan nilai 1 = “;
cin >> nilai1;


cout << “Masukan(+, -, /,*) =”;
cin >> op;


switch(op)
{

case ‘+’ : cout << “Masukan Nilai 2 =”;
cin >> nilai2;
hasil = nilai1 + nilai2;
cout << “ Hasilnya adalah = “ << hasil << endl;

nilai1 = hasil;

break;
case ‘+’ : cout << “Masukan Nilai 2 =”;
cin >> nilai2;
hasil = nilai1 + nilai2;
cout << “ Hasilnya adalah = “ << hasil << endl;
nilai1 = hasil;
break;

case ‘-‘ : cout << “Masukan Nilai 2 =”;
cin >> nilai2;
hasil = nilai1 - nilai2;
cout << “ Hasilnya adalah = “ << hasil << endl;
nilai1 = hasil;
break;

case ‘/’ : cout << “Masukan Nilai 2 = ”;
cin >> nilai2;
hasil = nilai1 / nilai2;
cout << “ Hasilnya adalah = “ << hasil << endl;
nilai1 = hasil;
break;

case ‘*’ : cout << “Masukan Nilai 2 = ”;
cin >> nilai2 ;
hasil = nilai1 * nilai2;
cout << “ Hasilnya adalah = “ << hasil << endl;
nilai1 = hasil;
break;

default : cout << “Maaf operator ( “ << op << “) tidak terdapat”;
}
cout << “Apa anda ingin mengulangi(Y/T) = “;
cin >> jwb;
}while ( jwb == ‘Y’ || jwb == ‘y’ );
return 0;
}