QuestionQuestion

1) Write a program with a loop that lets the user enters a series of integers. The user should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.

2) Write a program that calculates the balance of a savings account at the end of a period of time. It
should ask the user for the annual interest rate, the starting balance, and the number of months that have passed since the account was established. A loop should then iterate once for every month, performing the following:
A) Ask the user the amount deposited into the account during the month. (Do not accept negative numbers.). This amount should be added to the balance.
B) Ask the user for the amount withdrawn from the account during the month. (Do not accept negative numbers.). This amount should be subtracted from the balance.
C) Calculate the monthly interest. The monthly interest rate is the annual interest rate divided by twelve. Multiply the monthly interest rate by the balance, and add the result to the balance.
After the last iteration, the program should display the ending balance, the total amount of deposits, the total amount of withdrawals, and the total interest earned.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

1. #include <iostream>

int main(int argc, const char * argv[]) {
    // insert code here...
    bool input = true;
    int integer;
    int min;
    int max;
    while(input)
    {
       std::cout << "Please enter in an integer\n";
       std::cin >> integer;
       if (integer < 0)
       {
            if (integer == -99)
                input = !input;
            continue; //remove this continue if you want to support negative numbers
       }
       if(min == NULL || min > integer)
       {...
$16.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats