MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / Borrow

Function Borrow

Project_Bank_Management_System/Header.h:106–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void Borrow()
107{
108 long double borrow;
109 cout << "\n In during time in our bank we have " << ::available << "$" << endl;
110 cout << "\n How much do you want to borrow?" << endl;
111 cout << "\n ";
112 cin >> borrow;
113 if (borrow == 0)
114 {
115 cout << "\n You entered 0 value so now you are redirected to the menu" << endl << endl;
116 Sleep(2000);
117 }
118 else if (borrow <= ::available && borrow > 0)
119 {
120 cout << "\n We can give you such amount of money." << endl;
121 cout << "\n Please wait for a while, while we are transfering money to your account" << endl;
122 Sleep(3000);
123 ::available = ::available - borrow;
124 ::balance = ::balance + borrow;
125 ::borrow = ::borrow + borrow;
126 cout << "\n Money is successfully transfered to your account." << endl << endl;
127 }
128 else if (::borrow < 0)
129 {
130 cout << "\n Error!" << endl;
131 cout << "\n Please enter valid amount of money!" << endl << endl;
132 }
133 else {
134 cout << "\n We are sorry but we cant give you such amount of money" << endl << endl;
135 }
136 cout << "\n ";
137 system("pause");
138}
139
140void Return()
141{

Callers 1

MenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected