Write a program to calculate the simple interest. It inputs principal amount, rate of interest and the number of years and display the simple interest.

Write a program to calculate the simple interest. It inputs principal amount, rate of interest and the number of years and display the simple interest.





#include<iostream>
using namespace std;
int main()
{
float p,i,t,x;
cout<<"\t Simple Interest Calculator "<<endl;
cout<<"\n";
cout<<"Enter the principal amount "<<endl;
cin>>p;
cout<<"Enter the Rate of Interest "<<endl;
cin>>i;
cout<<"Enter the number of years "<<endl;
cin>>t;
x=(p+i+t)/100;
cout<<"Simple interest is "<<x<<endl;
}


Write a program to calculate the simple interest. It inputs principal amount, rate of interest and the number of years and display the simple interest.