forked from kanishkaa24/Basic-Programs-in-Cpp
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleInterestProgram.cpp
More file actions
Latest commit
21 lines (20 loc) · 552 Bytes
/
Copy pathSimpleInterestProgram.cpp
File metadata and controls
21 lines (20 loc) · 552 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<iostream>
usingnamespacestd;
intmain() {
cout<<"Enter the principle amount: ";
int principle;
cin>>principle;
cout<<"Enter the rate of interest in percentage: ";
int rateofinterest;
cin>>rateofinterest;
cout<<"Enter the time period in years: ";
int timeperiod;
cin>>timeperiod;
int interest;
interest = (principle*rateofinterest*timeperiod)/100;
int amount;
amount = interest + principle;
cout<<"The interest is: "<<interest;
cout<<"The total amount is: "<<amount;
return0;
}