File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ using namespace std ;
3+
4+ // Multiplication Table
5+ inline int product (int a, int b)
6+ {
7+ return a*b;
8+ }; // only make a function inline if the work in function is minimal
9+
10+ // int product(int a, int b)
11+ // {
12+ // static int c = 0;
13+ // c = c+ 1;
14+ // return a*b + c;
15+ // };
16+
17+ float moneyRecieved (int currentMoney, float factor = 1.04 ) {
18+ return currentMoney*factor;
19+ };
20+
21+ int main () {
22+
23+ // int a, b;
24+ // printf("Enter the first number: ");
25+ // cin>>a;
26+ // printf("Enter the second number: ");
27+ // cin>>b;
28+ // printf("\n");
29+ // cout<<"The product of first and second number is: "<<product(a,b);
30+ // cout<<"The product of first and second number is: "<<product(a,b);
31+ // cout<<"The product of first and second number is: "<<product(a,b);
32+ // cout<<"The product of first and second number is: "<<product(a,b);
33+ // cout<<"The product of first and second number is: "<<product(a,b);
34+ // cout<<"The product of first and second number is: "<<product(a,b);
35+
36+ int money = 1000 ;
37+ cout<<" If you have " <<money<<" INR into your bank account, you will recieve "
38+ <<moneyRecieved (money)<<" INR after 1 year." <<endl;
39+ cout<<" For VIP: If you have " <<money<<" INR into your bank account, you will recieve "
40+ <<moneyRecieved (money, 1.1 )<<" INR after 1 year." ;
41+
42+
43+ return 0 ;
44+ }
You can’t perform that action at this time.
0 commit comments