عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 18-03-2011, 10:30 PM   #4

هوتميلكوم

جامعي

 
تاريخ التسجيل: Apr 2010
التخصص: computer science
نوع الدراسة: إنتظام
المستوى: الأول
الجنس: أنثى
المشاركات: 22
افتراضي رد: سؤال في واجب التراكيب

ممكن تساعدوني في حل السؤال هاد
رجاءً مضطرة على الحل عندي امتحانات

the electric company charges according to the following rate schedule:
9 cents per kilowatt-hour (kwh) for the first 300 kwh
8 cents per kwh for the next 300 kwh (up to 600 kwh)
6 cents per kwh for the next 400 kwh ( up to 1000 kwh)
5 cents per kwh for all electricity used over 1000 kwh

write a fuction to compute the total charge for each custome.write a main function to call the charge calculation fuction using the following data
customer number kilowatt-hours used
123 725
205 115
464 600
596 327
... ...

the program should print a three column chart listing the customer number, the kilowatt hours used,and the charge for each customer.the program should also compute and print the number of customers,the total kilowatt hours used,and the total charges.

 

هوتميلكوم غير متواجد حالياً   رد مع اقتباس