بإستخدام C++ ,صمم بنك إلكتروني الي متكامل يقوم بالوظائف الأساسية ؟

  • برمجة
  • برمجة سي بلس بلس

بإستخدام C++ ,صمم بنك إلكتروني الي متكامل يقوم بالوظائف الأساسية والمطلوب:

1-أضف رمز pin خاص بالحساب لقفله برقم خاص بك؟

2-أضف لائحة لعرض الخدمات ؟

3-أضف خيار كشف على الحساب؟

4- أضف خيار إضافة قيمة على حسابك؟

5- أضف خيار سحب قيمة من حسابك؟

6- أضف خيار إضافة قيمة للخروج من القائمة وطباعة رسالة "thank you for using my servies" ؟

 

الأجوبة

ملاحظة تنفيذية: عند تنفيذ الكود التالي فإن رمز ال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;
}
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...