write a program to calculate simple interest and mixed amount, if the principal amount, time and rate of interested is given by the user

Program

#include<stdio.h>
#include<conio.h>
void main(){
int p;
float t,r,i,ma;
printf("\nInput principal Amount:-");
scanf("%d",&p);
printf("\nInput Time Period:-");
scanf("%f",&t);
printf("\nInput Rate of Interest:-");
scanf("%f",&r);
i=(p*t*r)/100;
ma=p+i;
printf("\nSimple Interest = Rs %10.2f",i);
printf("\nMixed Amount = Rs %10.2f",ma);
getch();
}

Output:

Input Principal Amount :- 200

Input Time Period :- 2

Input Rate of Interest :- 3

Simple Interest = rs 12.00

Mixed Amount = rs 212.00

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *