CPP
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
#include <iostream>
using namespace std;
int withdraw(int money, int cash){
// WITHDRAW untill 10000
if(cash > 10000){
cout << "You dont have that much money" << endl;
cout << "——————————————————————"<< endl;
cout<< "account balance:" << money;
}
else{
cout << "Your withdrawal:" << cash << endl;
cout << "——————————————————————"<< endl;
cout << "Account balance:" << money - cash;
}
//saving
return money;
}
int main() {
//input form user
int cash;
cin >> cash;
// time to print the money you have left.
withdraw(10000,cash);
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Exécuter