Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C++ Visual Studio) Good news!! You won the grant price just for being awesome!! However, as in many things in life, there is a catch.

(C++ Visual Studio)

Good news!! You won the grant price just for being awesome!! However, as in many things in life, there is a catch. Your prize will be paid to you in monthly installments.

The payments will start in the amount of 1 dollar. Obviously that is not too much of a price at the beginning. But here are two rules we can apply every month to increase the installments.

Rule A - Double the installment amount.

Rule B - Triple the installment amount.

You are free to apply Rule A every month, but Rule B can be applied only every other month.

To maximize payments.

1st month's payment 1 dollar.

2nd month's payment 2 dollars. (doubled the amount)

3rd month's payment 6 dollars. (triple it every other months)

4th month's payment 12 dollars. (double the amount)

5th month's payment 36 dollars. (triple it every other month)

6th month's payment 72 dollars. (double the amount)

7th month's payment 216 dollars. (triple it every other month)

and so on ...

Write a program that will compute the monthly payment amounts you will get over a given number of months.

Your program should take the number of months from user and create a loop to compute the payments for each month and output on screen.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

Students also viewed these Databases questions

Question

Does the equation 3x + y 2 = 10 define y as a function of x?

Answered: 1 week ago

Question

=+2. How reliable is this existing information?

Answered: 1 week ago