j

Tuesday, 3 November 2015

Write a program that take principal amount, rate and time and display principal amount, rate, time and simple interest amount.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
double p,r,t,i;
cout<<"Enter principal amount, rate and time ::";
cin>>p>>r>>t;
i=(p*r*t)/100;
cout<<"Principal Amount is "<<p<<endl;
cout<<"Rate "<<r<<"%"<<endl;
cout<<"Time "<<t<<"yrs"<<endl;
cout<<"Simple Interest Amount = Rs. "<<i;
getch();
}

Subscribe to this Blog via Email :