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