conthoh perogram C++ cara kerja bank
1.lihat saldo
2.penyetoran
3.penarikan
4.keluar
yg mau mendownload file cpp link : https://drive.google.com/file/d/10emrZBy__CzbLV1xPvFNYpUboBzX1Tz5/view
//INDO html
#include<iostream>
#include<conio.h>
#include<stdlib.h>
using namespace std;
int main()
{
int pil,saldo,setor,tarik;
char jawab;
saldo=1000000;
do
{
system("cls");
cout<<"INDO html"<<endl;
cout<<"===============================\n";
cout<<"| BANK OF DUWIT |\n";
cout<<"===============================\n\n";
cout<<"===============================\n";
cout<<"| MENU UTAMA |\n";
cout<<"===============================\n";
cout<<"| 1. lihat saldo |\n";
cout<<"| 2. penyetoran |\n";
cout<<"| 3. penarikan |\n";
cout<<"| 4. keluar |\n";
cout<<"===============================\n";
cout<<"Pilih Menu 1/2/3/4: ";
cin>>pil;
if(pil==1)
{
system("cls");
cout<<"===================\n";
cout<<"| menu cek saldo |\n";
cout<<"===================\n\n\n";
cout<<"jumlah saldo anda : Rp."<<saldo;
cout<<endl;
cout<<"---------------------------------------\n";
}
else
if(pil==2)
{
system("cls");
cout<<"=================\n";
cout<<"|Menu Penyetoran|\n";
cout<<"=================\n";
cout<<"jumlah saldo saat ini :Rp."<<saldo<<endl;
cout<<"----------------------------------\n";
cout<<"Jumlah Setor :RP.";
cin>>setor;
saldo=saldo+setor;
cout<<"total Saldo :RP."<<saldo<<endl;
}
else
if(pil==3)
{
system("cls");
cout<<"==================\n";
cout<<"| Menu Penarikan |\n";
cout<<"==================\n";
cout<<"jumlah saldo saat ini :Rp."<<saldo<<endl;
cout<<"--------------------------------------\n";
cout<<"Jumlah Penarikan :RP.";
cin>>tarik;
{
if (saldo-tarik<100000)
{
cout<<"Maaf Saldo Anda Tidak Mencukupi...\n";
cout<<"Saldo Minimal RP.1000000...\n";
}
else
{
saldo=saldo-tarik;
cout<<"=====================\n";
cout<<"sisa Saldo :RP."<<saldo;
cout<<endl;
}
}
}
else
if(pil==4)
{
cout<<endl;
cout<<"====================================================\n";
cout<<"| Terima Kasih Telah Menggunakan Layanan Bank Kami |\n";
cout<<"====================================================\n";
exit(1);
getche();
}
else
{
cout<<endl<<endl;
cout<<"=====================================\n";
cout<<"| Menu yang anda inputkan tidak ada |\n";
cout<<"| Mohon pilih menu yang tersedia |\n";
cout<<"=====================================\n\n\n";
}
cout<<"\n\n Kembali ke Menu Utama(Y/T)? : ";
cin>>jawab;
}
while(jawab=='Y'||jawab=='y');
cout<<endl;
cout<<"====================================================\n";
cout<<"| Terima Kasih Telah Menggunakan Layanan Bank Kami |\n";
cout<<"====================================================\n";
exit(1);
getche();
}
berikut ini menu menunya:
0 komentar