-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtut17.cpp
34 lines (32 loc) · 1.56 KB
/
tut17.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include<iostream>
using namespace std;
inline int product (int a , int b){
// Do not recommended to use below lines with inline functions
// static int c = 0;//This executes only once
// c= c+1; //Next time this function is run, the value of c will be retained
return a*b;
}
float moneyReceived( int currentMoney ,float factor = 1.04){
return currentMoney*factor;
}
int main(){
int a ,b ;
// cout<< "Enter the value of a and b"<<endl;
// cin >>a>>b;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
// cout << "The product of a and b is "<<product(a,b)<<endl;
int money = 100000;
cout << " If you have "<<money <<"Rs in your bank account ,you will receive "<<moneyReceived(money)<< "Rs after 1 year"<<endl;
cout << " For VIP : If you have "<<money <<"Rs in your bank account ,you will receive "<<moneyReceived(money,1.1)<< "Rs after 1 year"<<endl;
return 0;
}