Program BANK MUSS Pada C++
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
void main()
{ int mn,sld,setor,tarik;
char jwb;
sld=10000;
do
{
menu:
system("cls");
cout<<"=========================\n";
cout<<"| PT. BANK MUSS |\n";
cout<<"=========================\n";
cout<<"Saldo : "<<sld;
cout<<endl;
cout<<endl;
cout<<"=========================\n";
cout<<"| Menu Transaksi |\n";
cout<<"=========================\n";
cout<<"| 1. Setor Tabungan |\n";
cout<<"| 2. Ambil Tabungan |\n";
cout<<"| 3. Exit |\n";
cout<<"| |\n";
cout<<"=========================\n";
cout<<"Pilih Menu 1-3: ";
cin>>mn;
if(mn==1)
{ system("cls");
cout<<"Menu Penyetoran\n\n";
cout<<"Jumlah Setor : ";cin>>setor;
sld=sld+setor;
system("cls");
cout<<"Saldo : "<<sld;
cout<<endl;
}
else
if(mn==2)
{ system("cls");
cout<<"Jumlah Penarikan : ";cin>>tarik;
{
if (sld-tarik<10000)
{
system("cls");
cout<<"Saldo Anda Tidak Mencukupi...\n";
cout<<"Saldo Minimal 10000...\n";
}
else
{ sld=sld-tarik;
system("cls");
cout<<"Saldo : "<<sld;
cout<<endl;
}
}
}
else
if(mn==3)
exit(1);
else
{ system("cls");
cout<<"Menu yang anda inputkan tidak ada\n";
cout<<"Mohon pilih menu yang tersedia\n\n\n";
goto menu;
}
cout<<"\n\n Kembali ke Menu Utama(Y/T)? : ";
cin>>jwb;
}
while(jwb=='Y'||jwb=='y');
cout<<"\n **** Terima Kasih ****\n";
}
#include<conio.h>
#include<stdlib.h>
void main()
{ int mn,sld,setor,tarik;
char jwb;
sld=10000;
do
{
menu:
system("cls");
cout<<"=========================\n";
cout<<"| PT. BANK MUSS |\n";
cout<<"=========================\n";
cout<<"Saldo : "<<sld;
cout<<endl;
cout<<endl;
cout<<"=========================\n";
cout<<"| Menu Transaksi |\n";
cout<<"=========================\n";
cout<<"| 1. Setor Tabungan |\n";
cout<<"| 2. Ambil Tabungan |\n";
cout<<"| 3. Exit |\n";
cout<<"| |\n";
cout<<"=========================\n";
cout<<"Pilih Menu 1-3: ";
cin>>mn;
if(mn==1)
{ system("cls");
cout<<"Menu Penyetoran\n\n";
cout<<"Jumlah Setor : ";cin>>setor;
sld=sld+setor;
system("cls");
cout<<"Saldo : "<<sld;
cout<<endl;
}
else
if(mn==2)
{ system("cls");
cout<<"Jumlah Penarikan : ";cin>>tarik;
{
if (sld-tarik<10000)
{
system("cls");
cout<<"Saldo Anda Tidak Mencukupi...\n";
cout<<"Saldo Minimal 10000...\n";
}
else
{ sld=sld-tarik;
system("cls");
cout<<"Saldo : "<<sld;
cout<<endl;
}
}
}
else
if(mn==3)
exit(1);
else
{ system("cls");
cout<<"Menu yang anda inputkan tidak ada\n";
cout<<"Mohon pilih menu yang tersedia\n\n\n";
goto menu;
}
cout<<"\n\n Kembali ke Menu Utama(Y/T)? : ";
cin>>jwb;
}
while(jwb=='Y'||jwb=='y');
cout<<"\n **** Terima Kasih ****\n";
}
mathap programny gan ...
ReplyDeleteSemoga bermanfaat...
Delete