1. 7/5/2015 CONTOH PROGRAM C++ KALKULATOR C++ ~ Contoh Program C++
http://tugasdpk.blogspot.com/2014/12/programkalkulatorc.html 1/7
Categories
Latihan (16)
Pertemuan 0 (1)
Pertemuan 1 (2)
Pertemuan 2 (3)
Pertemuan 3 (15)
Tugas (4)
Jangan di Klik
Populer
CONTOH PROGRAM C++
OPERATOR BITWISE KIRI
scirpt #include <stdio.h> #include
<conio.h> #include <iostream.h>
void main() { int x; cout<<"...
CONOTH PEROGRAM C++
PENGGUNAAN NOTASI
DIBELAKANG VARIABEL
scirpt // Penggunaan Notasi di
Belakang Variabel #include
<stdio.h> #include <conio.h> void
main() { int a = 8, ...
CONTOH PROGRAM C++ KALKULATOR
C++
By Wildan Jisung On 05.26 In Pertemuan 3, Tugas With No comments
#include <iostream.h>
#include <conio.h>
void main ()
{
awal:
int a, b, c, hasil;
char d, e;
cout<<"=============== KALKULATOR ===============n";
cout<<"Masukan Bilangan ke1 : ";
cin>>a;
cout<<"Masukan Operator ke1 : ";
cin>>d;
cout<<"Masukan Bilangan Ke2 : ";
cin>>b;
cout<<"Masukan Operator ke2 : ";
cin>>e;
cout<<"Masukan Bilangan ke3 : ";
cin>>c;
cout<<"================ HASILNYA ================n";
if (d =='+' & e =='+' )
{
hasil = a+b+c;
cout<<""<<a<<"+"<<b<<"+"<<c<<" = "
<<hasil<<endl;
}
else if (d =='+' & e =='' )
{
hasil = a+bc;
cout<<""<<a<<"+"<<b<<""<<c<<" = "
<<hasil<<endl;
}
else if (d =='+' & e =='*' )
{
hasil = a+b*c ;
Contoh Program C++
Berisi Berbagai Contoh Program C++ dari Hasil Perkuliahan
Home Business » Downloads » Parent Category » Featured Health »
Uncategorized
tugasdpk.blogspot.com
2. 7/5/2015 CONTOH PROGRAM C++ KALKULATOR C++ ~ Contoh Program C++
http://tugasdpk.blogspot.com/2014/12/programkalkulatorc.html 2/7
Diberdayakan oleh Blogger. cout<<""<<a<<"+"<<b<<"*"<<c<<" = "
<<hasil<<endl;
}
else if (d =='+' & e =='/' )
{
hasil = a+b/c ;
cout<<""<<a<<"+"<<b<<"/"<<c<<" = "
<<hasil<<endl;
}
else if (d =='+' & e =='%' )
{
hasil = a+b%c;
cout<<""<<a<<"+"<<b<<"%"<<c<<" = "
<<hasil<<endl;
}
else if (d =='' & e =='+' )
{
hasil = ab+c ;
cout<<""<<a<<""<<b<<"+"<<c<<" = "
<<hasil<<endl;
}
else if (d =='' & e =='' )
{
hasil = abc ;
cout<<""<<a<<""<<b<<""<<c<<" = "
<<hasil<<endl;
}
else if (d =='' & e =='*' )
{
hasil = ab*c ;
cout<<""<<a<<""<<b<<"*"<<c<<" = "
<<hasil<<endl;
}
else if (d =='' & e =='/' )
{
hasil = ab/c ;
cout<<""<<a<<""<<b<<"/"<<c<<" = "
<<hasil<<endl;
}
else if (d =='' & e =='%' )
{
hasil = ab%c;
cout<<""<<a<<""<<b<<"%"<<c<<" = "
<<hasil<<endl;
}
else if (d =='*' & e =='+' )
{
hasil = a*b+c ;
cout<<""<<a<<"*"<<b<<"+"<<c<<" = "
<<hasil<<endl;
}
3. 7/5/2015 CONTOH PROGRAM C++ KALKULATOR C++ ~ Contoh Program C++
http://tugasdpk.blogspot.com/2014/12/programkalkulatorc.html 3/7
else if (d =='*' & e =='' )
{
hasil = a*bc ;
cout<<""<<a<<"*"<<b<<""<<c<<" = "
<<hasil<<endl;
}
else if (d =='*' & e =='*' )
{
hasil = a*b*c;
cout<<""<<a<<"*"<<b<<"*"<<c<<" = "
<<hasil<<endl;
}
else if (d =='*' & e =='/' )
{
hasil = a*b/c ;
cout<<""<<a<<"*"<<b<<"/"<<c<<" = "
<<hasil<<endl;
}
else if (d =='*' & e =='%' )
{
hasil = a*b%c ;
cout<<""<<a<<"*"<<b<<"%"<<c<<" = "
<<hasil<<endl;
}
else if (d =='/' & e =='+' )
{
hasil = a/b+c ;
cout<<""<<a<<"/"<<b<<"+"<<c<<" = "
<<hasil<<endl;
}
else if (d =='/' & e =='' )
{
hasil = a/bc ;
cout<<""<<a<<"/"<<b<<""<<c<<" = "
<<hasil<<endl;
}
else if (d =='/' & e =='*' )
{
hasil = a/b*c ;
cout<<""<<a<<"/"<<b<<"*"<<c<<" = "
<<hasil<<endl;
}
else if (d =='/' & e =='/' )
{
hasil = a/b/c ;
cout<<""<<a<<"/"<<b<<"/"<<c<<" = "
<<hasil<<endl;
}
else if (d =='/' & e =='%' )
{
hasil = a/b%c ;
4. 7/5/2015 CONTOH PROGRAM C++ KALKULATOR C++ ~ Contoh Program C++
http://tugasdpk.blogspot.com/2014/12/programkalkulatorc.html 4/7
cout<<""<<a<<"/"<<b<<"%"<<c<<" = "
<<hasil<<endl;
}
else if (d =='%' & e =='+' )
{
hasil = a%b+c ;
cout<<""<<a<<"%"<<b<<"+"<<c<<" = "
<<hasil<<endl;
}
else if (d =='%' & e =='' )
{
hasil = a%bc ;
cout<<""<<a<<"%"<<b<<""<<c<<" = "
<<hasil<<endl;
}
else if (d =='%' & e =='*' )
{
hasil = a%b*c ;
cout<<""<<a<<"%"<<b<<"*"<<c<<" = "
<<hasil<<endl;
}
else if (d =='%' & e =='/' )
{
hasil = a%b/c ;
cout<<""<<a<<"%"<<b<<"/"<<c<<" = "
<<hasil<<endl;
}
else if (d =='%' & e =='%' )
{
hasil = a%b%c ;
cout<<""<<a<<"%"<<b<<"%"<<c<<" = "
<<hasil<<endl;
}
cout<<"==========================================n";
cout<<"Mengulang : [Y/N] ? " ;
char m ;
cin>>m;
if (m == 'Y'|| m== 'y')
goto awal;
else if (m == 'N'|| m == 'n')
{
goto akhir;
}
akhir:
cout<<"Terima Kasih"<<endl;
getche();
}
Hasil :
5. 7/5/2015 CONTOH PROGRAM C++ KALKULATOR C++ ~ Contoh Program C++
http://tugasdpk.blogspot.com/2014/12/programkalkulatorc.html 5/7
Share This: Facebook Stumble Digg
Flowchart :
Related Posts:
CONTOH PROGRAM C++ OPERATOR "|"
scirpt #include #include #include void main() {
int a, x, y; cout"Masukan Nilai X = "; cinx;
cout"Masuka… Read More
CONTOH PROGRAM C++ PENGGUNAAN OPERATOR
RELASI DAN PENGONDISIAN IF ELSE
scirpt // Penggunaan operator relasi dan if, if else
#include #include void main() { int m = 5, n = 7; if (m ==
n) coutm" Sama Den… Read More
6. 7/5/2015 CONTOH PROGRAM C++ KALKULATOR C++ ~ Contoh Program C++
http://tugasdpk.blogspot.com/2014/12/programkalkulatorc.html 6/7
Posting Lebih Baru Posting LamaBeranda
CONTOH PROGRAM C++ OPERATOR AND
scirpt #include #include #include void main() { int a, x, y;
cout"Masukan Nilai X = "; cinx; cout"Masukan Nilai Y =
"; c… Read More
CONTOH PROGRAM C++ KALKULATOR C++
#include #include void main () { awal: int a, b, c, hasil;
char d, e; cout"=============== KALKULATOR
===============n"; cout"Mas… Read More
CONTOH PROGRAM C++ OPERATOR LOGIKA
scirpt //Program Operator Logika #include #include void
main() { int m=166; cout=0 && m "=0 && m=150)endl;
cout=0 || m "=0 || m… Read More