Computer Science, asked by ChrisNevin, 1 year ago

Write a program to find compound interest​

Answers

Answered by charlie1505
2

Answer:

You didn't mention any programming language... so I've used c

#include <stdio.h>

#include <math.h>

int main()

{

float p, r, t, ci;

printf("Enter the principle :");

scanf("%f", &p);

printf("Enter the rate :");

scanf("%f", &r);

printf("Enter the time :");

scanf("%f", &t);

ci = p * pow((1 + r / 100), t) - p;

printf("\nThe compound interest is %0.2f", ci);

return 0;

}

Explanation:

here math header file used for mathematical function like pow ie, power

Similar questions