 # Programming Questions

Subject Computer Science C-Family Programming

## Question

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 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)
{...

This is only a preview of the solution. Please use the purchase button to see the entire solution

## Related Homework Solutions

Heapsort and Mergesort Implemented in C++ Language \$38.00
Heapsort
Mergesort
Sorting Algorithm
Pseudocode
Sort
Computer Science
C-Family Programming
A C++ Class That Will Manage an Encrypted Password \$48.00
C++
Computer
Science
C-Family
Programming
Class
Driver
Test
Conditions
Linux
Simple Sum Using C Programming Language \$10.00
Computer Science
Programming
Summation
Loops
Statements
Variables
Functions
Input
Output
Algorithms
Checkers Game Using Socket Communication \$40.00
Programming
Computer Science
Checkers Game
Moves
Players
Codes
Rules
Statements
Variables
Functions
Socket Communication
Managers
Parent Process
Child Process
Results
Winners
C: Blackjack Implementation \$23.00
C
Computer
Science
Blackjack
21
Player
Dealer
Programming
Game
Card
Bust
Rules
Hit
Stand
Live Chats