Amount using Compound Interest coderinme

Amount using Compund Interest

When interest compound Q times per year at an annual rate of R% for N years, the principle P compounds to an amount A the following formula
A=P*(1+R/100)(N*Q)
So the code in C to find the amount using compound interest is below:


#include<stdio.h>
int main()
{
double A,P,R;
int N,Q;
printf("Enter the value for P: ");
scanf("%lf", &P);
printf("Enter the value for R: ");
scanf("%lf", &R);
printf("Enter the value for N: ");
scanf("%d", &N);
printf("Enter the value for Q: ");
scanf("%d", &Q);
A = P * pow( 1 + R / 100 , N * Q );
printf("The corresponding value of A: %.3lf",A);
getch();
return 0;
}

For more programs in C, visit our C Coder Archives

Amount using Compound Interest coderinme

All rights reserved. No part of this Post may be copied, distributed, or transmitted in any form or by any means, without the prior written permission of the website admin, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the owner, addressed “Attention: Permissions Coordinator,” to the admin @coderinme

Leave a reply:

Your email address will not be published.