Header Ads Widget

Write a CPP program to calculate simple interest

 Code:-

#include<bits/stdc++.h>
using namespace std;
int main()
{
float p,r,t,SI;
cout<<"Enter Principle Amount ,interest rate and time duration \n";
cin>>p>>r>>t;
SI=(p*r*t)/100;
cout<<"Simple interest is : "<<SI;
return 0;
}

Output:-

Enter Principle Amount ,interest rate and time duration
2000 10 1
Simple interest is: 200




Post a Comment

0 Comments