Skip to content

Commit 0b9eda6

Browse files
Update Default Argument and Constant Argument.cpp
1 parent 1fd961a commit 0b9eda6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1+
#include<iostream>
2+
using namespace std;
3+
float moneyreceived(int currentmoney,float factor=1.04){
4+
return currentmoney*factor;
5+
}
6+
int main(){
7+
int money=100000;
8+
cout<<"if you have "<<money<<" Rs in your bank account,you will receive"<<moneyreceived(money)<<"Rs after 1 year"<<endl;
9+
10+
cout<<"For vip: If you have"<<money<<"Rs in your bank account,you will receive"<<moneyreceived(money,1.4)<<" Rs after 1 year";
11+
return 0;
12+
}
13+
114

0 commit comments

Comments
 (0)