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

خدمة لن انسالكم هي

مغلق
بدأه smiler_ht في 30 أكتوبر 2003 · 1 رد · 691 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته....

أولا كل عام وانتم بخير وبركة.........

شباب بالله انا مرة مضيع ومني عارف كيف اسوي البرنامج هذا في السي ++..... حاولت شتى الطرق عشان اسويه.. بس ماقدرت.وانا لازم اسلم هذا البرنامج بكره.. تكفى ياشباب اللي عندو اي خلفية كيف يتعمل هذا البرنامج لايبخل علي...واكون من الشاكرين..

وهذا هو المطلوب في البرنامج

Program Assignment:

You need to take out a loan to complete your degree. You have decided to use your new programming skills to determine how long it will take to pay off the loan! Let’s assume that interest on your loan is paid on a declining balance and therefore a loan with an interest rate of 14% can cost significantly less than 14% of the balance.

Write a C++ program that will take the loan amount and interest rate as input and then output regular payments and balance of the loan until the loan is paid off. At the end, output the total amount of interest to be paid. You must use a loop (do while, while, or for) to accomplish this. Assume that the monthly payments are one twentieth of the original loan amount and that any amount in excess of the interest is credited toward decreasing the balance due.

For example, on a loan of $20,000, the payments would be $1,000 a month. If the interest rate is 10%, then each month the interest is one twelfth of 10% of the remaining balance. Therefore, the first month (10% of $20,000)/12 or $166.67 would be paid in interest and the remaining $833.33 would decrease the balance to $19,166.67. The second month, the interest would be (10% of $19,166.67)/12 and so forth.

Things you should know...as part of your program

a. Allow the user to enter the amount of the loan and the interest rate. If you want to make the program more flexible, you can input the amount of payment you would like to make. (You can always make the assignments more interesting by adding more features to them…but this is not required!)

b. Use a variable to count the number of loop iterations and therefore the number of months until the balance is zero. You may use other variables as well.

c. The program should discard any invalid data sets (e.g., negative numbers).

d. Error messages should be displayed whenever data is discarded and the user should be given another change to enter their data.

e. You need to use at least 2 different types of loops in this assignment (for, while, and do-while are your choices).

f. Make sure to display your dollars and cents using $ in front of them and two digits after the decimal point.

On the due date, turn in:

a. A listing of your C++ code and output. At the top right corner of the listing write your name, class, and assignment number (Program #3). Remember to email your program to the teacher.

b. Your output should show that you have run your program 3 different times, using different data.

c. Remember to turn in an algorithm with your program; it is worth 20% of your program grade. And, don’t forget to add comments and to work on your program’s readability; this is another 20%!!

#2

لو كتبتها بلغة العربية كنت ساعدك

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

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

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…