12th Class NCERT Solution Download Click Here!

X




Sunday, 13 March 2016

Write a program which accept principle, rate and time from user and print the simple interest.

#include<iostream>
using namespace std;

int main()
{
 int p,r,t,i;
 cout<<"Enter Principle : ";
 cin>>p;
 cout<<"Enter Rate : ";
 cin>>r;
 cout<<"Enter Time : ";
 cin>>t;
 i=(p*r*t)/100;
 cout<<"Simple interest is : "<<i;

 
 return 0;
}


OUTPUT:

Enter Principle : 1800
Enter Rate : 5
Enter Time : 3
Simple interest is : 270

No comments:

Post a Comment