berikut :
Ukuran
Kode Kertas
Merek
PT
Paper Two
25000
27000 30000
GD
Globe Dunia
26000
28000 31000
UJ
Ultra Jaya
29000
32000 33000
Kwarto
A4
HVS
#include<iostream>
#include<string>
#include<conio.h>
using namespace std;
void main()
{
//deklarasi variabel
string kodekertas="", merek="", ukuran="", ket="", jawab="";
long int harga=0, jumlah=0, total=0;
//input
do {
cout<<"Input Kode Kertas : "; getline(cin,kodekertas);
cout<<"Input Ukuran Kertas : "; getline(cin,ukuran);
cout<<"Input Jumlah : "; cin>>jumlah;
merek="Paper Two";
if (ukuran=="kwarto" || "KWARTO")
{
harga=25000;
}
else if (ukuran=="A4" || "a4")
{
harga=27000;
}
else if (ukuran=="HVS" || "hvs")
{
harga=30000;
}
}
else if (kodekertas=="GD" || kodekertas=="gd")
{
merek="Globe Dunia";
if (ukuran=="kwarto" || ukuran=="KWARTO")
{
harga=26000;
}
}
else if (kodekertas=="UJ" ||kodekertas=="uj")
{
merek="Ultra Jaya";
if (ukuran=="kwarto" || "KWARTO")
{
harga=29000;
}
else if (ukuran=="A4" || "a4")
{
harga=32000;
}
else if (ukuran=="HVS" || "hvs")
{
harga=33000;
}
}
else
{
//output
system("cls");
cout<<"============================================="<<endl;
cout<<"Merek Kertas Fotocopy
: "<<merek<<endl;
: "<<jumlah<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"Total Bayar
: Rp "<<total<<",-"<<endl;
cout<<"---------------------------------------------"<<endl;
cout<<ket<<endl;
cout<<"---------------------------------------------"<<endl;
cout<<"Apakah anda ingin mengulang program ini?(y/t)";
getline(cin,jawab);
}while (jawab == "y");
_getche();
}
#include<iostream>
#include<string>
#include<conio.h>
using namespace std;
void main()
{
//deklarasi variabel
//input
do {
cout<<"Input Kode Kertas : "; getline(cin,kodekertas);
cout<<"Input Ukuran Kertas : "; getline(cin,ukuran);
cout<<"Input Jumlah : "; cin>>jumlah;
merek="Paper Two";
if (ukuran=="kwarto" || "KWARTO")
{
harga=25000;
}
else if (ukuran=="A4" || "a4")
{
harga=27000;
}
else if (ukuran=="HVS" || "hvs")
{
harga=30000;
}
}
else if (kodekertas=="GD" || kodekertas=="gd")
{
merek="Globe Dunia";
if (ukuran=="kwarto" || ukuran=="KWARTO")
{
harga=26000;
}
else if (ukuran=="A4" || ukuran=="a4")
{
harga=28000;
}
else if (ukuran=="HVS" || "hvs")
{
harga=31000;
}
}
else if (kodekertas=="UJ" ||kodekertas=="uj")
{
merek="Ultra Jaya";
if (ukuran=="kwarto" || "KWARTO")
{
harga=29000;
}
}
else
{
ket="Maaf, data yang anda masukan belum tepat";
}
//output
system("cls");
cout<<"============================================="<<endl;
cout<<"Merek Kertas Fotocopy
: "<<merek<<endl;
: "<<jumlah<<endl;
cout<<"Harga Kertas
: Rp"<<harga<<",-"<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"Total Bayar
: Rp "<<total<<",-"<<endl;
cout<<"---------------------------------------------"<<endl;
cout<<ket<<endl;
cout<<"---------------------------------------------"<<endl;
cout<<"\n\nTerima Kasih telah berbelanja ditempat
kami!"<<char(1)<<endl;
cin.ignore();
cout<<"Apakah anda ingin mengulang program ini?(y/t)";
getline(cin,jawab);
}while (jawab == "y");
_getche();
}
#include<iostream>
#include<string>
#include<conio.h>
using namespace std;
void main()
{
//deklarasi variabel
//input
do {
cout<<"Input Kode Kertas : "; getline(cin,kodekertas);
cout<<"Input Ukuran Kertas : "; getline(cin,ukuran);
cout<<"Input Jumlah : "; cin>>jumlah;
{
merek="Paper Two";
harga=25000;
}
else if (kodekertas == "PT" ||"pt" && ukuran=="A4" || "a4")
{
merek="Paper Two";
harga=27000;
}
else if (kodekertas == "PT" ||"pt" && ukuran=="HVS" || "hvs")
{
merek="Paper Two";
harga=30000;
}
else if (kodekertas == "GD" ||"dt" && ukuran=="KWARTO" ||
"kwarto")
{
merek="Globe Dunia";
harga=26000;
}
else if (kodekertas == "GD" ||"dt" && ukuran=="A4" || "a4")
{
merek="Globe Dunia";
harga=28000;
}
else if (kodekertas == "GD" ||"dt" && ukuran=="HVS" || "hvs")
{
merek="Globe Dunia";
harga=31000;
}
//output
system("cls");
cout<<"============================================="<<endl;
cout<<"Merek Kertas Fotocopy
: "<<merek<<endl;
cout<<"Jumlah Beli
: "<<jumlah<<endl;
cout<<"Harga Kertas
: Rp "<<harga<<",-"<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"Total Bayar
: Rp "<<total<<",-"<<endl;
cout<<"---------------------------------------------"<<endl;
cout<<ket<<endl;
cout<<"---------------------------------------------"<<endl;
cout<<"\n\nTerima Kasih telah berbelanja ditempat
kami!"<<char(1)<<endl;
cin.ignore();
cout<<"Apakah anda ingin mengulang program ini?(y/t)";
getline(cin,jawab);
}while (jawab == "y");
_getche();
}