Kasir Sederhana
Buat kalian yang mau butuh aplikasi kasir sederhana dengan C++#include <iostream>
/* run this program using the console pauser or add your own getch,
system("pause") or input loop */
using namespace std;
void makanan(){
int makan,jumlah;
int harga;
cout<<"\t\t\tDAFTAR MENU MAKANAN\n ";
cout<<"\t\t\t-------------------\n";
cout<<"1. Mie ayam\n";
cout<<"2. Mie dok-dok\n";
cout<<"Masukan pilihan = ";
cin>>makan;
if(makan == 1){
cout<<"Nama \t\t= "<< "Mie ayam \n";
harga = 7000;
cout<<"Harga \t\t= 7000\n";
cout<<"Jumlah \t\t= ";
cin>>jumlah;
cout<<"Bill \t\t= "<<jumlah*harga;
}else if (makan == 2){
cout<<"Nama \t\t= "<<"Mie dok-dok \n";
harga = 8000;
cout<<"Harga \t\t= 8000\n";
cout<<"Jumlah \t\t= ";
cin>>jumlah;
cout<<"Bill \t\t= "<<jumlah*harga;
}else{
cout<<"habis";
}
}
int main(int argc, char *argv[]) {
makanan();
return 0;
}
0 komentar:
Posting Komentar