0
6.8kviews
Write a program to calculate compound interest and amount using formula A=P(1+R/100)n where P= Principal amount, R= Rate of interest, n=number of years.

Mumbai University> FE > Sem 2> STRUCTURED PROGRAMMING APPROACH

Marks: 10 M

Year: May 2016

1 Answer
0
263views
#include<stdio.h>
float power(float base, float n);
main()
{
float CIA, P, R, n,CIY;
int i;
printf(“Enter Principal Amount:”);
scanf(“%f”,&P);
printf(“Enter rate of interest:”);
scanf(“%f”&R);
printf(“Enter number of years:”);
scanf(“%f”,&n);
CIA=P*power((1+R/100),n);
printf(“Total Compound interest and amount is %f”,CIA);
for(i=1;i<=n;i++)
{
    CIY=P*((1+R/100),i)-P;
    printf(“\nTotal interest at the end of year %d is %f …

Create a free account to keep reading this post.

and 2 others joined a min ago.

Please log in to add an answer.