diff --git a/SIMPLE INTEREST.cpp b/SIMPLE INTEREST.cpp new file mode 100644 index 0000000..f5aee5f --- /dev/null +++ b/SIMPLE INTEREST.cpp @@ -0,0 +1,20 @@ +#include +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; +}