-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtut17.cpp
More file actions
23 lines (20 loc) · 709 Bytes
/
tut17.cpp
File metadata and controls
23 lines (20 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<iostream>
using namespace std;
inline int product(int a ,int b){
// static int c=0; //eexecutes once
// c = c + 1; // c keeps changing
return a*b;
}
float moneyRec(int curr_money, float factor=1.04){
return curr_money * factor;
}
int main(){
// int a,b;
// cout<<"enter numbers: "<<endl;
// cin>>a>>b;
// cout<<"the product of the numbers is "<<product(a,b);
int money = 100000;
cout<<"If u have "<<money<<"Rs in your bank account, you will receive "<<moneyRec(money)<<" in your account"<<endl;
cout<<"VIPs: If u have "<<money<<"Rs in your bank account, you will receive "<<moneyRec(money, 1.1)<<" in your account";
return 0;
}