Hadeh... =="
lama ga Update nih... Sorry yah...
nih sekarang gwa mau share ilmu gwa tentang :
Program Calculator Versi C++
langsung aje yeh... nih Source Code nya >.<
#include <iostream.h>
#include <conio.h>
main(){
int bil1,bil2,pil;
float hsl;
cout<<"Pilihlah menu di bawah ini :\n";
cout<<"[1] Penjumlahant\n";
cout<<"[2] Pengurangan\n";
cout<<"[3] Perkalian\n";
cout<<"Masukkan pilihan anda : ";
cin>>pil;
switch (pil)
{ case 1:
cout<<"Input bil 1 = ";cin>>bil1;
cout<<"Input bil 2 = ";cin>>bil2;
hsl=bil1+bil2;
cout<<"Hasil penjumlahannya = "<<hsl<<endl<<endl;
break;
case 2:
cout<<"Input bil 1 = ";cin>>bil1;
cout<<"Input bil 2 = ";cin>>bil2;
hsl=bil1-bil2;
cout<<"Hasil pengurangannya = "<<hsl<<endl<<endl;
break;
case 3:
cout<<"Input bil 1 = ";cin>>bil1;
cout<<"Input bil 2 = ";cin>>bil2;
hsl=bil1*bil2;
cout<<"Hasil perkaliannya = "<<hsl<<endl<<endl;
break;
default :
cout<<"Maaf blm terdaftar";
}
getch();
}
hahaha tuh di atas moga" bermanfaat... >.< esok hari akan update Ilmu n Game wkwkwkwk
lama ga Update nih... Sorry yah...
nih sekarang gwa mau share ilmu gwa tentang :
Program Calculator Versi C++
langsung aje yeh... nih Source Code nya >.<
#include <iostream.h>
#include <conio.h>
main(){
int bil1,bil2,pil;
float hsl;
cout<<"Pilihlah menu di bawah ini :\n";
cout<<"[1] Penjumlahant\n";
cout<<"[2] Pengurangan\n";
cout<<"[3] Perkalian\n";
cout<<"Masukkan pilihan anda : ";
cin>>pil;
switch (pil)
{ case 1:
cout<<"Input bil 1 = ";cin>>bil1;
cout<<"Input bil 2 = ";cin>>bil2;
hsl=bil1+bil2;
cout<<"Hasil penjumlahannya = "<<hsl<<endl<<endl;
break;
case 2:
cout<<"Input bil 1 = ";cin>>bil1;
cout<<"Input bil 2 = ";cin>>bil2;
hsl=bil1-bil2;
cout<<"Hasil pengurangannya = "<<hsl<<endl<<endl;
break;
case 3:
cout<<"Input bil 1 = ";cin>>bil1;
cout<<"Input bil 2 = ";cin>>bil2;
hsl=bil1*bil2;
cout<<"Hasil perkaliannya = "<<hsl<<endl<<endl;
break;
default :
cout<<"Maaf blm terdaftar";
}
getch();
}
hahaha tuh di atas moga" bermanfaat... >.< esok hari akan update Ilmu n Game wkwkwkwk
0 komentar:
Posting Komentar