Write a C program to input principal, rate and time(in year) and find simple interest and final amount.


void main()
{
float p,r,t,si,fa;
printf("Enter Principal amount, rate and time.");
scanf("%f%f%f",&p,&r,&t);
si=(p*r*t)/100;
fa=p+si;
printf("Simple Interest=%f", si);
printf("Final Amount=%f", fa);
getch();
}

Input : 1200 2 3
Output: Simple interest=108
              Final Amount=1308