السلام عليكم
صباح الخير
كون هذه اول مشاركه لي
عندي الاستفسار الاول اللي هو هذا السؤال
والاستفسار الثاني انا طالب ادرس ماده
c++
والمقرر نستخدم
how to program c++
المنهج بالانجليزي هذا اولا وطريقة شرح الدكتور ما ناسبتني
فنصائحكم من اين ابتدئ
هل فيه كتاب فيه شرح
مواضيع تفيد مثلاً
انا مابي اكثر من الاوراق وبعدها اكره الماده
ابي ابسط طريق لتعلم هذه اللغه واكون محترف فيها
بس اعذروني توني مبتدئ وابي اطور نفسي بنفسي واللي يسأل ما يضيع على قولتهم
write a program that treast with a customer bank acount, the customer has an inital balance $5000;the customer can deposit and withdraw into and from his account many times,the program has display balance(),deposit() and whithdraw() functions. the customer can withdraw from his account until the account reaches overdraft.your program should display the balance after each greater than the balance.
انا لقيت برنامج مشابه له
بس هل هي نفس الفكره ولا لا
1
2 #include <iostream>
34using std::cout;5 using std::endl;
6 using std::cin;
7 using std::ios;
89#include <iomanip>10
11 using std::setprecision;
12 using std::setiosflags;
13
14 int main()
15 {
16 int accountNumber;
17 double balance, charges, credits, limit;
18
19 cout << "Enter account number (-1 to end): "
20 << setiosflags(ios::fixed | ios::showpoint);
21 cin >> accountNumber;
22
23 while ( accountNumber != -1 ) {
24 cout << "Enter beginning balance: ";
25 cin >> balance;
26 cout << "Enter total charges: ";
27 cin >> charges;
28 cout << "Enter total credits: ";
29 cin >> credits;
30 cout << "Enter credit limit: ";
31 cin >> limit;
32 balance += charges - credits;
33
34 if ( balance > limit )
35 cout << "Account: " << accountNumber
36 << "\nCredit limit: " << setprecision( 2 ) << limit
37 << "\nBalance: " << setprecision( 2 ) << balance
38 << "\nCredit Limit Exceeded.\n";
39
40 cout << "\nEnter account number (-1 to end): ";
41 cin >> accountNumber;
42 }
43
44 cout << endl; // ensure all output is displayed
45
46 return 0;
47 }
