الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

أرجو منكم المساعده ضروووووري

مغلق
بدأه فرح في 3 ديسمبر 2002 · 1 رد · 282 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم والرحمه

اخواني واخواتي انا طالبه في الجامعه سنة ثانيه وابي منكم هالخدمه وإن شاء الله الاقي منكم الجواب

هذا برنامج الدكتور طلب مني اسويه وانا مب عارفه كيف اسويه وابي احد منكم يشرح لي اياه ويعلمني كيف اسويه وهو يبيه يوم السبت

بلييييييييز نقذوني

Assume you have to write a program for a Rent a Car Company. Your program should ask for the Hiring date of the car and delivering back date of the car and then calculate the days the car was with the customer and then displays the amount payable by the customer assuming Rental rate is 90 Dirhams per day.

Programming hints (in writing this program you have to follow the following steps):

Declare a structure with following data members (all data members should be int type)

* Hiring month

* Hiring date

* Delivering month

* Delivering date

Declare a variable of above structure in main function

Pass this declared variable to an input function which asks user about above dates and months and saves the results in this passed structure variable. (In input function you have to place cheeks so that the date should be between 1 and 31 and month should be between 1 and 12 and Delivering month should be greater then the hiring month). To avoid complexity of the program we will assume that we are working in the same year. If a student wants to implement this program for different years he / she will be appreciated

Calls (calculate function) from input function and pass the structure variable to this calculate function. This function will calculates the total no of days the car was with the customer then displays the total amount the customer has to pay. To avoid complexity of the program we will assume that all months of year are of 30 or 31 days. If a student wants to implement exact calculations of the days of a month (say Month 11 has 30 days and Month 12 has 31 days and month 2 has 28 days) he / she will be appreciated.

تحياتي لكم

#2

أظن من شروط طرح المواضيع في المنتدى خصوصا مواضيع التي تطلب في الدراسة أن يضع طارح الموضوع محاولته أولا ثم تناقش في المنتدى

و ثانيا : أظن أن الدكتور قد قدم شرح كااافي لهذا البرنامج تحت باب hints

و حسب ما فهمته :

أولا يتم اعلان عن منشأة بيانات datastrcture تحتوي على متغيرات أربعة ألا و هي شهر التأجير و التاريخ ثم شهر الارجاع مع التاريخ .

ثانيا : يتم فتح دالة المين main و الاعلان عن المتغيرات السابقة .

ثالثا : عمل دالة function لقراءة المتغيرات السابقة مع فحصها و التأكد من منطقيتها .

رابعا : عمل دالة لحساب القيمة النهائية التي سوف يدفعها العميل بحساب عدد الأيام ضربها في قيمة اليوم .

أظن أن هذا البرنامج سهل للغاية و ربما لا يحتاج أكثر من ساعتان على الكثير بس الهمة مطلوبه ....

هذا الموضوع مغلق.

مواضيع مشابهة