مشاهدة النسخة كاملة : ممكن لو سمحتوا حل هذي الاسئلة ؟؟


احساس مرهف
22-12-2007, 09:18 PM
السلام عليكم ورحمة الله وبركاته


لو سمحتوا اللي يعرف الحل لايبخل علي.. انا حاولت فيهم بس واايد صعبين



Question 1:


Consider a telephone company that has different number of calls with the following call time-dependent costs


Call Type Price JD / minute


First 100 minutes free


Next 200 minutes 0.05JD/minute Local


Above 300 minutes 0.03JD/minute


First 30 minutes free National Above 30 minutes 0.1 JD/minute


International 1.0 JD/ minute


Mobile 0.4 JD / minute



Write a program to calculate the fees for unknown number of customers for each customer read call type and


number of minutes, print the total fees for each customer, then print the grand total for all the customers


/




Question 2


Develop a C++ program that uses a while statement to determine the gross pay for each of several employees.


The company pays “straight time” for the first 40 hours worked by each employee and pays “time-and-a-half” for


all hours worked in excess of 40 hours. You are given a list of the employees of the company, the number of hours


each employee worked last week and the hourly rate of each employee. Your program should input this information


for each employee and should determine and display the employee's gross pay.



Sample Output


Enter hours worked (-1 to end): 39


Enter hourly rate of the worker ($00.00): 10.00


Salary is $390.00


Enter hours worked (-1 to end): 40


Enter hourly rate of the worker ($00.00): 10.00


Salary is $400.00


Enter hours worked (-1 to end): 41


Enter hourly rate of the worker ($00.00): 10.00


Salary is $415.00


Enter hours worked (-1 to end): -1


/




Question 3


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 information is available:


a) Account number (an integer);


b) Balance at the beginning of the month;


c) Total of all items charged by the customer this month;


d) Total of all credits applied to the customer’s account this month;


e) Allowed credit limit.


The program should use a while loop to input each of these facts, calculate the new balance (= beginning balance+


charges – credits) and determine whether the new balance exceeds the customer’s 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."



:Sample Output


Enter account number (-1 to end): 100


Enter beginning balance: 5394.78


Enter total charges: 1000.00


Enter total credits: 500.00


Enter credit limit: 5500.00


New balance is 5894.78


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 charges: 123.45


Enter total credits: 321.00


Enter credit limit: 1500.00


New balance is 802.45


Enter account number (-1 to end): 300


Enter beginning balance: 500.00


Enter total charges: 274.73


Enter total credits: 100.00


Enter credit limit: 800.00


New balance is 674.73


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


انتظر ردودكم.. والله يعطيكم العافية ،

احساس مرهف
10-01-2008, 05:57 PM
ربي يعطيـكم ألف عافيـة ياا حلوين

hemalinux-c
29-02-2008, 01:10 AM
هابقي احلهم ان شاء الله وابعتهم لك