69 679
Assignments Done
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. *
Expert's answer
#include <iostream>
using namespace std;
int main()
cout << "Write your shares: "; //ask user to enter shares
double s; //declaratin variable for shares
cin >> s; //reading shares
cout << "Write your deposit: "; //ask user to enter deposit
double d; //declaratin variable for deposit
cin >> d; //reading 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
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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions