#include <stdio.h>
#include <math.h>
int main()
{
float p, r, year, ci;
printf("Type principal Amount: ");
scanf("%f", &p);
printf("Type rate of Interest: ");
scanf("%f", &r);
printf("Type time in years: ");
scanf("%f", &year);
ci=p*((pow((1+r/100),year)-1));
printf("Compound interest is: %f\n",ci);
return 0;
}
Bhuvan Arora
No comments:
Post a Comment