Draw flowchart AND write pseudo code for each of the following
problems.
1. User asks you to develop a program that calculates and then
prints interest earned on a bank balance. Program should print
interest earned for the same balance when interest is accumulated
annually, semiannually and quarterly.
Interest earned yearly=balance * rate /100 for annual Interest
earned semiannually =balance*rate/2/100 for semi annual Interest
earned quarterly= balance*rate/4/100 for quarterly
FLOWCHART
OUTPUT
PSEUDOCODE
PROGRAM INPLEMENTATION USING C++
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
//declare the variables
double balance,year,semiyear,quarter,rate;
//input the balance
cout<<endl<<"Enter the balance";
cin>>balance;
//input the rate of interest
cout<<endl<<"Enter the rate of
interest";
cin>>rate;
//compute the yearly interest
year = balance *rate/100;
//compute the semiyearly interest
semiyear = balance * rate/2/100;
//compute the quarterly interest
quarter = balance * rate/4/100;
//display the details
cout<<endl<<"Balance :
$"<<fixed<<setprecision(2)<<balance;
cout<<endl<<"Yearly Interest :
$"<<fixed<<setprecision(2)<<year;
cout<<endl<<"Semiyearly Interest :
$"<<fixed<<setprecision(2)<<semiyear;
cout<<endl<<"Quarterly Interest :
$"<<fixed<<setprecision(2)<<quarter;
}
OUTPUT
Get Answers For Free
Most questions answered within 1 hours.