Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions SIMPLE INTEREST.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <iostream>
using namespace std;
int main(){
int p, t, r, SI;

// Asking for input
cout << "Enter the principal amount: ";
cin >> p;
cout << "Enter the time period(in years): ";
cin >> t;
cout << "Enter the rate of interest: ";
cin >> r;

// Calculating simple interest
SI = (p*r*t) / 100;

// Displaying output
cout << "Simple Interest: " << SI << endl;
return 0;
}