Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please!! Use PRECISELY the format below with the EXACT same SPACING. Please enter the initial balance: Please enter the interest rate : Please enter

image text in transcribedimage text in transcribed

C++ please!!

Use PRECISELY the format below with the EXACT same SPACING. Please enter the initial balance: Please enter the interest rate : Please enter the number of years: OUTPUT SPECIFICATION Output an introductory message, prompts, and then the table. The sample output below assumes in the of 1000, an interest rate of 6.50, and a number of years of 10. Note well the FORMATTING (spacing and justification) used. You may assume numbers will not overflow their columns. This program will calculate the interest earned on a CD over a period of several years. Please enter the initial balance: 1000 Please enter the interest rate : 6.5 Please enter the number of years: 10 \begin{tabular}{lrrr} Year & Balance & Interest & New Balance \\ \hline1 & 1,000.00 & 65.00 & 1,065.00 \\ 1 & 1,065.00 & 69.23 & 1,134.23 \end{tabular} Include at LEAST the following methods. // Inform user what program will do void printintro (); // Print the header followed by all the rows, void printTable (int numRows, double balance, double rate); // Print one row of table, "interest" is a dollar amount, // not a rate. void printRow (int rownum, double balance, double interest); // Calculate interest given a balance and percentage rate (like 7.2\%) double calcinterest (double balance, double rate); HINTS Do NOT worry about formatting the table until you get the logic correct. Once you do get the logic correct, use to format the four table columns (Year, Balance, Interest, and New Balance). You may find this StackOverflow question useful. It involves setlocale() and using an apostrophe. Set the locale ONLY ONCE, and do so in main(). Note that if you're using a nonlab machine your program may behave differently, so ensure you test thoroughly on a Linux Lab machine before submitting. Depending on your system's implementation of printf, some of your amounts may differ from mine by a cent. The following width guide may be of use

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

Step: 3

blur-text-image

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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Recognize traditional approaches to performance appraisals

Answered: 1 week ago

Question

3. Would you say that effective teamwork saved their lives?

Answered: 1 week ago