#include<conio.h>
#include<stdio.h>
#include<math.h>
int main()
{
float
p=0.0,r=0.0,si=0.0,ci=0.0;
int t=0;
printf("\n
enter the principal,rate and time:");
scanf("%f%f%d",&p,&r,&t);
if(p<10000)
{
si=p*r*t/100;
printf("\n
the simple interest is :%f",si);
}
else
{
ci=p*pow(1+(r/100),t);
printf("\n
the compound interest is :%f",ci);
}
getch();
return 0;
}
No comments:
Post a Comment