0% found this document useful (0 votes)
31 views3 pages

C++ Pelajaran

This document contains a C++ source code for a basic banking transaction program. The program allows the user to select from a menu to deposit, withdraw, or exit from their bank account. It tracks the account balance and only allows withdrawals if there is at least Rp. 10,000 remaining in the account. The code uses input/output streams, conditional statements, and looping to process the transactions and display outputs like the menu, balances, and messages.

Uploaded by

Jhon Berutu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views3 pages

C++ Pelajaran

This document contains a C++ source code for a basic banking transaction program. The program allows the user to select from a menu to deposit, withdraw, or exit from their bank account. It tracks the account balance and only allows withdrawals if there is at least Rp. 10,000 remaining in the account. The code uses input/output streams, conditional statements, and looping to process the transactions and display outputs like the menu, balances, and messages.

Uploaded by

Jhon Berutu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

PT.

BANK SYARIAH BENERAN


---------------------------------------------
Saldo : ....

Menu Transaksi
1. Setor Tabungan
2. Ambil Tabungan
3. Exit
Pilihan menu (1/2/3) ? ...

Ketentuan :
Bank membuat kebijakan bahwa saldo minimum yang harus disisakan di
rekening adalah Rp. 10.000,-

Source Code C++


#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
int menu , setor, tarik;
char jawab;
long saldo;
saldo=10000;
do
{
menu:
system("cls");
cout<<"|===========================|\n";
cout<<"| PT. BANK SYARIAH BENERAN |\n";
cout<<"|===========================|\n";
cout<<" Saldo Anda:Rp. "<<saldo;
cout<<"\n|==========================|\n";
cout<<"| Menu Transaksi |\n";
cout<<"|===========================|\n";
cout<<"| 1. Setor Tabungan |\n";
cout<<"| 2. Ambil Tabungan |\n";
cout<<"| 3. Exit |\n";
cout<<"|===========================|\n";
cout<<" Pilih Menu (1/2/3) ? : ";
cin>>menu;
if(menu==1)
{ system("cls");
cout<<"|=================================|\n";
cout<<"| Menu Penyetoran |\n";
cout<<"|=================================|\n";
cout<<" Jumlah Setor :Rp. ";cin>>setor;
saldo=saldo+setor;
system("cls");
cout<<"|=================================|\n";
cout<<"| Saldo |\n";
cout<<"|=================================|\n";
cout<<" Saldo Anda :Rp. "<<saldo;
cout<<endl;
}
else if(menu==2)
{ system("cls");
cout<<"|=================================|\n";
cout<<"| Menu Penarikan |\n";
cout<<"|=================================|\n";
cout<<" Jumlah Penarikan :Rp. ";cin>>tarik;
{
if (saldo-tarik<10000)
{
system("cls");
cout<<"|=================================|\n";
cout<<"| Maaf Saldo Anda Tidak Mencukupi |\n";
cout<<"| Saldo Minimal Rp.10000 |\n";
cout<<"| |\n";
cout<<"|===========Terima Kasih==========|\n";
cout<<"******* By Bang Vandawablog *******\n";
}
else
{ saldo=saldo-tarik;
system("cls");
cout<<"|=================================|\n";
cout<<"| Saldo |\n";
cout<<"|=================================|\n";
cout<<" Saldo Anda :Rp. "<<saldo;
cout<<endl;
}
}
}
else if(menu==3)
{ exit(1);
else
{ cout<<"\n\nMenu yang anda inputkan tidak ada \n";
goto menu;
}
cout<<"\nKembali ke Menu Utama(Y/T)? : ";
cin>>jawab;
}
while(jawab=='Y'||jawab=='y');
cout<<"\n****** Terima Kasih ******\n";
cout<<"**** Bang Vandawablog ****\n";
}

Hasil Program

OK SOB.....Sekian posting saya mengenai Contoh Program Keperluan Transaksi Bank


Dengan C++.
Semoga bermanfaat.....!!

You might also like