#include <stdio.h>
#include <conio.h>
#include <math.h>
#define N 3
int main()
int i,j;
float irate,investment,curInterest,curInvest,totInterest=0.0; //variable declaration
float getIntRate(); //function declaration
float getAmount();
float findInterest(float amt, float irate);
irate=getIntRate(); //get the interest rate from keyboard
investment=getAmount(); //get the investment amount from keyboard
curInvest=investment; //set the current investment
for(i=1;i<=N;i++) //loop starts upto N years
printf(“Year : %dn”, i); //print the heading
printf(“————————nn”);
printf(“tQuarter Balance Interest Total Interest Totaln”);
printf(“t=================================================================n”);
for(j=1;j<=4;j++) //number of terms
curInterest=findInterest(curInvest,irate); //find the interest rate for the current quarter
totInterest+=curInterest; //update the total interest
printf(“t%dt%.2ftt%.2ftt%.2ftt%.2fnn”,j,curInvest, curInterest,totInterest,(curInvest+curInterest)); //print the interest details
curInvest=curInvest+curInterest; //update the final total
system(“pause”); //wait the keyboard response from user
return 0;
float findInterest(float amt, float irate)
float interest;
interest= (amt * irate) /400.0; //find the interest
return interest;
float getIntRate()
float interest;
while(1)
printf(“Enter the interest rate : “);
scanf(“%f”,&interest); //read the interest rate
if(interest>=5 && interest<=20) //check if the interest rate between 5 and
break; //if the above condition is true, exit from the loop
else
printf(“nInvalid interest rate. It should be between 5 and 20n”); //else print the error message
return interest; //return the interest value
float getAmount()
float inv;
while(1
printf(“nEnter the Investment Amount : “);
scanf(“%f”,&inv); //read the investment amount
if(inv>0) //if the investment amount is greater than zero, if yes, exit from the loop
break;
else
printf(“nInvalid investment amount. It should be greater than 0n”); //otherwise, print the error message
return inv;
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Contact Essay is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Essay Writing Service Works
First, you will need to complete an order form. It's not difficult but, in case there is anything you find not to be clear, you may always call us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order formOnce we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignmentAs soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download