مشاهدة النسخة كاملة : بروجكت عقدني في حيآآتي والله :(


آنسه غيمه،}!
17-11-2007, 01:03 PM
بسم الله الرحمن الرحيم
السلامُ عليكم ورحمةُ الله وبركاتُه

عندي بروجكت مطلوب تسليمه بكره !
حآولت احله الآف المرآت بس بالنهاية يطلع لي إيروورز !
اتمنى احد يقدر يسآعدني ..
وبكون شآآكرة وممنونه .. .،


Develop a C++ program that will determine whether a department-store customer has exceeded the credit limit on a charge account


For each customer, the following facts are available:
A) Account number (an integer)
b) Balance at the beginning of the month.
c) Total of all items charged by this customer this month.
d) Total of credits applied to this customer's account this month.
e) Allowed credit limit.

The program should use a While structure to input each of these facts:
Calculate the new balance = (beginning balance + charges – credits) & determine whether the new balance exceeds the customers credit limit. For those customers whose credit limit is exceeded, the program should display the customer's account number, credit limit, new balance and the message "Credit limit exceeded ".


the output should be like this

Enter account number ( -1 to end ): 100
Enter beginning balance: 5394.78
Enter total charge: 1000.00
Enter total credits: 500.00
Enter credit limit: 5500.00
Account: 100
Credit limit: 5500.00
Balance: 5894.78
Credit limit Exceeded.


Enter account number ( -1 to end ): 200
Enter beginning balance: 1000.00
Enter total charge: 123.45
Enter total credits: 321.00
Enter credit limit: 1500.00
Enter account number ( -1 to end ): 300

Enter beginning balance: 500.00
Enter total charge: 274.73
Enter total credits: 100.00
Enter credit limit: 800.00

Enter account number ( -1 to end ): -1






اتمنى تكون المكتبة المستخدمه فقط <iostream>
ويآآليت يكون الحل بأسهل الطرق .. لأني مستوى اول ..
وودي افهم .. قبل مااسلمه ، وبالنسبه للحل فـ يعتمد على طريقة while loop & if stetment
يآآرب احد يقدر يساعدني بوقت قصير
ومشكورين .. ربي لاهآنكم إن شاءالله




تقديري للجميع
غيمة

منطلق بطموحي
17-11-2007, 06:57 PM
السلام عليكم:

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

آنسه غيمه،}!
18-11-2007, 08:33 PM
/

السلام عليكم ،
اولاً اخوي .. انا مو جآية اغصبك على شي او اطلبك حآجة ..
الله الغني عنك .. وعن مسآعدتك ..

ثانياً .. انا اعتقد اني وضحت ان البرنامج كآن يطلع إيرور لي ..
يعني كنت احاول فيه .. وكنت تقدر تطلب انك تشوف المحآولة بأسلوب احسن من كِذا ..
" وبعدين وين كنت طوآل فترة البروجكت .. ! "
اعتقد انك مُش ادرى بمصلحتي اكثر مني .. وللمعلومية البروجكت ياخوي مايحتآج
اكثر من يوم !
والدليل اني عملته من اول وجديد البآرح ..
والحمد لله طلع بيرفكت وصحيح ميه ميه ..
لو كنت مثل ماانته مسوي حالك مهتم كنت ع الاقل سألت عن الإيرور اللي يطلع لي !
والا بس .. جآي تتكلم بأسلوب سيء! !!

على العموم
مشكور وإذا انت تبي تعرف الحل السريع اللي ماياخذ منك يوم ..
هذا انا ارفقته لك ..

ومشكورين




// the program will determine wither a departmant-store customer has exceeded the credit limit on a charge acount or not.

#include
<iostream>
using

namespace std;
int

main()
**
int account_number;
double balance ,charge,credits,credit_limit;
// the program will start here with asking the person to enter the account number.
cout<<

"Enter account number ( -1 to end ):";
cin>> account_number;
while (account_number !=-1)// if the user will enter account naumber bigger than and not equal to -1 the progrom will excute. but if it will be -1 the progrom will end.
**
cout <<" Enter beginning balance:";
cin>>balance;
cout << " Enter total charge: ";
cin>> charge;
cout << " Enter total credits:";
cin>> credits;
cout<< "Enter credit limit:";
cin>> credit_limit;
balance= balance + charge - credits;
// it will start again if the conditoin will be true.
if ( balance > credit_limit)
**

cout<<" Account:"<< account_number;
cout<<" Credit limit:"<< credit_limit;
cout<<" Balance:"<<balance;
cout<<" Credit limit Exceeded." << endl;
}
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
// it will start over.
cout<<

"\n Enter account number ( -1 to end ): ";
cin>> account_number;
}
return 0;
}