➽  Program:-
#include<stdio.h>
#include<math.h>
int main()
{
    float
principal_amount, rate, time, compound_interest;
    printf("Enter
Principal Amount: ");
    scanf("%f",
&principal_amount);
 
    printf("Enter
time(in years): ");
    scanf("%f",
&time);
 
    printf("Enter
rate: ");
    scanf("%f",
&rate);
 
    compound_interest
= principal_amount * (pow((1 + rate / 100), time));
 
    printf("Compound
Interest = %f", compound_interest);
    return 0;
}
➽  Output:-
Enter Principal Amount: 1700
Enter time(in years): 3
Enter rate: 6.7
Compound Interest = 2065.105469
 

 
0 Comments
Please do not enter any spam link in the comment section.