69 679
Assignments Done
99,4%
Successfully Done
In February 2019

# Answer to Question #63388 in C++ for derel

Question #63388
A credit union pays 4% interest on shares that are greater than \$25 000.00 and 3% on all other shares. No interest is paid on deposits. Write a structured algorithm that prompts the user to input a share and a deposit. The algorithm should calculate and output the interest amount and the total savings. (Total savings = shares + deposit + interest amount). Be sure to declare all variables used in the algorithm. *
#include <iostream>
using namespace std;
int main()
{
double s; //declaratin variable for shares
double d; //declaratin variable for deposit
double t; //declaratin variable for total savings
if (s > 25000) //if shares >25000 then credit union pays 4%, else 3%
t = d + s*1.04; //calculating total savings for shares > 25000
else
t = d + s*1.03; //calculating total savings for shares < 25000
cout << "Your total savings: " << t; //print total savings
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!