بإستخدام C++ ,صمم بنك إلكتروني الي متكامل يقوم بالوظائف الأساسية ؟
- برمجة
- برمجة سي بلس بلس
- 2021-05-25
- ahmadghneem
الأجوبة
ملاحظة تنفيذية: عند تنفيذ الكود التالي فإن رمز الpin الموجود لقفل الحساب هو 147258.
#include <iostream>
using namespace std;
int main()
{ int pin;
int choice;
int bln=1000;
int withdraw;
int deposit;
int c=true;
cout << "************welcome our sreveis bank ahm@d**************"<<endl;
while(pin != 147258){
cout << "enter your pin:";
cin>>pin;
}
do{
cout<<"1-cheack account:"<<endl;
cout <<"2-withdraw cash"<<endl;
cout <<"3- input in your account"<<endl;
cout <<"4- Quit"<<endl;
cout<<"chose from the menu : ";
cin>>choice;
switch(choice) {
case 1:
cout <<"your account bln is :$"<<bln<<endl;
break;
case 2:
cout<<"enter the amount to withdraw :";
cin>> withdraw;
if (withdraw > bln){
cout<<"you don't have enough mony...";
}
else{
bln=bln - withdraw;
cout <<"your account bln is :$"<<bln<<endl;
break;
}
case 3:
cout<<"enter the amount : ";
cin>>deposit;
bln=bln+deposit;
cout <<"your account bln is :$"<<bln<<endl;
break;
case 4:
cout<<"\n====>thank you for using my servies Ahm@d Ghneem<====\n";
c=false;
break;
default:
cout<<"the number dose not find "<<endl;
break;
}
}
while (c!=false);
return 0;
}
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال