SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Walter Savitch ,julia Lobur
Chapter:
Procedural Abstraction And Functions That Return A Value
Exercise:
Programming Projects
Question:6 | ISBN:9780321531346 | Edition: 7

Question

6. Write a function declaration for a function that computes interest on a

credit card account balance. The function takes arguments for the initial

balance, the monthly interest rate, and the number of months for which

interest must be paid. The value returned is the interest due. Do not forget

to compound the interest—that is, to charge interest on the interest due.

The interest due is added into the balance due, and the interest for the

next month is computed using this larger balance. Use a while loop that

is similar to (but need not be identical to) the one shown in Display 2.14.

Embed the function in a program that reads the values for the interest

rate, initial account balance, and number of months, then outputs the

interest due. Embed your function definition in a program that lets the

user compute interest due on a credit account balance. The program

should allow the user to repeat the calculation until the user said he or

she wants to end the program.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Sorry the answer is not available at the moment…

If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.

Spread the 'tradition of sharing'.