Berikut ini adalah program metode transfer uang di bank dengan coding C++
Anda bisa langsung menggunakannya compile dan run .
===========================================
#include<iostream>
using namespace std;
int check();
int trans();
int bank();
int saldo=10000000,transfer,pil;
string nomor ;
int main()
{
system("color 1F");
int pilih;
char repeat;
{
//saldo_akhir=saldo-transfer;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"--------------------------------------------------------------------------"<<endl<<endl;
cout<<"Silahkan pilih Menu yang anda inginkan :"<<endl;
cout<<"1. Transfer <======"<<endl;
cout<<"2. informasi Saldo <======"<<endl<<endl;
cout<<"Masukan menu pilihan Anda : ";
cin>>pilih;
if(pilih==1)
{
return bank();
}
if(pilih==2)
{
return check();
}
else
{
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"---------------------------------------------------------------"<<endl<<endl;
cout<<"Pilihan tidak ada, apakah Anda ingin kembali ke menu utama? [Y/N]";
cin>>repeat;
if(repeat=='Y'||repeat=='y')
{
system("cls");
return main();
}
if(repeat=='N'||repeat=='n')
{
return 0;
}
}
system("pause");
}
}
// bank
int bank()
{
system("cls");
char repeat;
int kode;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"------------------------------------------------------------------"<<endl<<endl;
cout<<"PILIH BANK TUJUAN TRANSFER YANG ANDA INGINKAN"<<endl;
cout<<"------------------------------------------------------------------"<<endl<<endl;
cout<<"1. Ke rekening BRI <===="<<endl;
cout<<"2. Ke rekening lain <===="<<endl<<endl;
cout<<"Masukkan plihan Anda : ";
cin>>pil;
if(pil==1)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"----------------------------------------"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
if(pil==2)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------"<<endl<<endl;
cout<<"Keterangan kode bank "<<endl;
cout<<"002 : BNI 005 : Danamon"<<endl;
cout<<"006 : Mandiri 451 : BSM"<<endl;
cout<<"007 : Bukopin 200 : BTN "<<endl;
cout<<"Silahkan masukkan kode bank tujuan transfer Anda"<<endl<<endl;
cin>>kode;
if(kode==002)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-----------------------------------------------------------"<<endl<<endl;
cout<<"Bank BRI"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==006)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"----------------------------------------------------------"<<endl<<endl;
cout<<"Bank Mandiri"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==007)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------"<<endl<<endl;
cout<<"Bank bukopin"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==005)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------"<<endl<<endl;
cout<<"Bank Danamon"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==200)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"----------------------------------------------------------"<<endl<<endl;
cout<<"Bank BTN"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==451)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"---------------------------------------------------------------"<<endl<<endl;
cout<<"Bank BSM"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
}
else
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"--------------------------------------------------------------"<<endl<<endl;
cout<<"Pilihan tidak ada, apakah Anda ingin mkembali ke menu utama? [Y/N]";
cin>>repeat;
if(repeat=='Y'||repeat=='y')
{
system("cls");
return bank();
}
if(repeat=='N'||repeat=='n')
{
return 0;
}
}
}
//transfer
int trans()
{
system("cls");
char sure,back;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------------------"<<endl<<endl;
cout<<"Masukan Jumlah transfer : Rp. ";
cin>>transfer;
if(saldo>transfer)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-----------------------------------------------------------"<<endl<<endl;
cout<<"Apakah Anda yakin untuk melakukan transfer sebesar Rp. "<<transfer<<endl;
cout<<" ke rekening "<<nomor<<" ? [Y/N]";
cin>>sure;
if(sure=='Y'||sure=='y')
{
system("cls");
saldo=saldo-transfer;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------------"<<endl<<endl;
cout<<"Selamat, transfer Anda berhasil!"<<endl<<endl;
cout<<"saldo anda Rp."<<saldo<<endl;
}
}
else
{
system("cls");
cout<<"Maaf, Saldo Anda tidak mencukupi!"<<endl;
cout<<"Apakah Anda ingin kembali ke menu awal? [Y/N] : ";
cin>>back;
if(back=='Y'||back=='y')
{
system("cls");
return main();
}
else
{
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"---------------------------------------------------------------------"<<endl<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" Terima Kasih"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" Silahkan ambil kembali kartu ATM anda"<<endl;
return 0;
system("pause");
}
}
cout<<endl;
cout<<"------------------------------------------------------------------------------"<<endl;
cout<<"Apakah Anda ingin melakukan transaksi lainnya?[Y/N] : ";
cin>>back;
if(back=='Y'||back=='y')
{
system("cls");
return main();
}
else
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"------------------------------------------------------------"<<endl<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" terima kasih"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" silahkan ambil kembali kartu ATM anda"<<endl;
system("pause");
return 0;
}
}
//check saldo
int check()
{
system("cls");
char confirm;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-----------------------------------------------------------------------"<<endl<<endl;
cout<<" Informasi saldo anda"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<"Saldo : Rp. "<<saldo<<endl<<endl;
cout<<"Apakah Anda ingin melakukan transaksi lagi?[Y/N] : ";
cin>>confirm;
if(confirm=='Y'||confirm=='y')
{
system("cls");
return main();
}
else
{
system ("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" terima kasih"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" silahkan ambil kembali kartu ATM anda"<<endl;
system("pause");
return 0;
}
}
===========================================
Anda bisa langsung menggunakannya compile dan run .
===========================================
#include<iostream>
using namespace std;
int check();
int trans();
int bank();
int saldo=10000000,transfer,pil;
string nomor ;
int main()
{
system("color 1F");
int pilih;
char repeat;
{
//saldo_akhir=saldo-transfer;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"--------------------------------------------------------------------------"<<endl<<endl;
cout<<"Silahkan pilih Menu yang anda inginkan :"<<endl;
cout<<"1. Transfer <======"<<endl;
cout<<"2. informasi Saldo <======"<<endl<<endl;
cout<<"Masukan menu pilihan Anda : ";
cin>>pilih;
if(pilih==1)
{
return bank();
}
if(pilih==2)
{
return check();
}
else
{
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"---------------------------------------------------------------"<<endl<<endl;
cout<<"Pilihan tidak ada, apakah Anda ingin kembali ke menu utama? [Y/N]";
cin>>repeat;
if(repeat=='Y'||repeat=='y')
{
system("cls");
return main();
}
if(repeat=='N'||repeat=='n')
{
return 0;
}
}
system("pause");
}
}
// bank
int bank()
{
system("cls");
char repeat;
int kode;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"------------------------------------------------------------------"<<endl<<endl;
cout<<"PILIH BANK TUJUAN TRANSFER YANG ANDA INGINKAN"<<endl;
cout<<"------------------------------------------------------------------"<<endl<<endl;
cout<<"1. Ke rekening BRI <===="<<endl;
cout<<"2. Ke rekening lain <===="<<endl<<endl;
cout<<"Masukkan plihan Anda : ";
cin>>pil;
if(pil==1)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"----------------------------------------"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
if(pil==2)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------"<<endl<<endl;
cout<<"Keterangan kode bank "<<endl;
cout<<"002 : BNI 005 : Danamon"<<endl;
cout<<"006 : Mandiri 451 : BSM"<<endl;
cout<<"007 : Bukopin 200 : BTN "<<endl;
cout<<"Silahkan masukkan kode bank tujuan transfer Anda"<<endl<<endl;
cin>>kode;
if(kode==002)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-----------------------------------------------------------"<<endl<<endl;
cout<<"Bank BRI"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==006)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"----------------------------------------------------------"<<endl<<endl;
cout<<"Bank Mandiri"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==007)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------"<<endl<<endl;
cout<<"Bank bukopin"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==005)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------"<<endl<<endl;
cout<<"Bank Danamon"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==200)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"----------------------------------------------------------"<<endl<<endl;
cout<<"Bank BTN"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
else if(kode==451)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"---------------------------------------------------------------"<<endl<<endl;
cout<<"Bank BSM"<<endl<<endl;
cout<<"Silahkan masukkan nomor rekening tujuan transfer Anda"<<endl<<endl;
cin>>nomor;
return trans();
}
}
else
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"--------------------------------------------------------------"<<endl<<endl;
cout<<"Pilihan tidak ada, apakah Anda ingin mkembali ke menu utama? [Y/N]";
cin>>repeat;
if(repeat=='Y'||repeat=='y')
{
system("cls");
return bank();
}
if(repeat=='N'||repeat=='n')
{
return 0;
}
}
}
//transfer
int trans()
{
system("cls");
char sure,back;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------------------"<<endl<<endl;
cout<<"Masukan Jumlah transfer : Rp. ";
cin>>transfer;
if(saldo>transfer)
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-----------------------------------------------------------"<<endl<<endl;
cout<<"Apakah Anda yakin untuk melakukan transfer sebesar Rp. "<<transfer<<endl;
cout<<" ke rekening "<<nomor<<" ? [Y/N]";
cin>>sure;
if(sure=='Y'||sure=='y')
{
system("cls");
saldo=saldo-transfer;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-------------------------------------------------------------------"<<endl<<endl;
cout<<"Selamat, transfer Anda berhasil!"<<endl<<endl;
cout<<"saldo anda Rp."<<saldo<<endl;
}
}
else
{
system("cls");
cout<<"Maaf, Saldo Anda tidak mencukupi!"<<endl;
cout<<"Apakah Anda ingin kembali ke menu awal? [Y/N] : ";
cin>>back;
if(back=='Y'||back=='y')
{
system("cls");
return main();
}
else
{
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"---------------------------------------------------------------------"<<endl<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" Terima Kasih"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" Silahkan ambil kembali kartu ATM anda"<<endl;
return 0;
system("pause");
}
}
cout<<endl;
cout<<"------------------------------------------------------------------------------"<<endl;
cout<<"Apakah Anda ingin melakukan transaksi lainnya?[Y/N] : ";
cin>>back;
if(back=='Y'||back=='y')
{
system("cls");
return main();
}
else
{
system("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"------------------------------------------------------------"<<endl<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" terima kasih"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" silahkan ambil kembali kartu ATM anda"<<endl;
system("pause");
return 0;
}
}
//check saldo
int check()
{
system("cls");
char confirm;
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"-----------------------------------------------------------------------"<<endl<<endl;
cout<<" Informasi saldo anda"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<"Saldo : Rp. "<<saldo<<endl<<endl;
cout<<"Apakah Anda ingin melakukan transaksi lagi?[Y/N] : ";
cin>>confirm;
if(confirm=='Y'||confirm=='y')
{
system("cls");
return main();
}
else
{
system ("cls");
cout<<" Selamat datang di ATM BRI(BANK RAKYAT INDONESIA)"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" terima kasih"<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cout<<" silahkan ambil kembali kartu ATM anda"<<endl;
system("pause");
return 0;
}
}
===========================================