commit ba779831c25d84c957ac5763f2cfbf32e99d829e
parent fd36763205c27e0ecb651f2aade914ffb4dc4a68
Author: Agastya Chandrakant <acagastya@outlook.com>
Date: Fri, 8 Sep 2017 05:16:11 +0530
\n
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/s3/oops/bank.cpp b/s3/oops/bank.cpp
@@ -16,7 +16,7 @@ class BBVA {
};
void BBVA::assign(int x) {
- cout << "Enter the name, account type and balance for account number " << x << " :\t";
+ cout << "\nEnter the name, account type and balance for account number " << x << " :\t";
cin >> name >> accountType >> balance;
accountNumber = x;
fflush(stdin);
@@ -28,7 +28,7 @@ void BBVA::deposit(float x) {
return;
}
balance+=x;
- cout << "Successfully deposited " << x << ". New balance is: " << balance << endl;
+ cout << "\nSuccessfully deposited " << x << ". New balance is: " << balance << endl;
}
void BBVA::withdraw(float x) {
@@ -37,7 +37,7 @@ void BBVA::withdraw(float x) {
return;
}
balance-=x;
- cout << "Successfully withdrawn " << x << " from the account. Current balance is: " << balance << endl;
+ cout << "\nSuccessfully withdrawn " << x << " from the account. Current balance is: " << balance << endl;
}
void BBVA::display(int x) {
@@ -63,7 +63,7 @@ int main() {
BBVA *b = a;
do{
sum = 0;
- cout << "\nEnter number corrosponding to their label\n1. Enter the details\t2. Deposit money\n3. Withdraw money\t4. Display details\n5. Add more accounts\t6. Exit\n\nYour input> ";
+ cout << "\nEnter number corrosponding to their label\n\n1. Enter the details\t2. Deposit money\n3. Withdraw money\t4. Display details\n5. Add more accounts\t6. Exit\n\nYour input> ";
cin >> input;
fflush(stdin);
switch (input) {
@@ -83,7 +83,7 @@ int main() {
cout << "\nAccount not found. Can not deposit money.\n";
break;
}
- cout << "Enter amount to be deposited.\nYour input> ";
+ cout << "\nEnter amount to be deposited.\nYour input> ";
cin >> sum;
a[index].deposit(sum);
break;
@@ -94,7 +94,7 @@ int main() {
cout << "\nAccount not found. Can not withdraw money.\n";
break;
}
- cout << "Enter amount to be withdrawn.\nYour input> ";
+ cout << "\nEnter amount to be withdrawn.\nYour input> ";
cin >> sum;
a[index].withdraw(sum);
break;
@@ -108,7 +108,7 @@ int main() {
a[index].display(index);
break;
case 5:
- cout << "Enter new number of bank accounts\nYour input> ";
+ cout << "\nEnter new number of bank accounts\nYour input> ";
cin >> maxNew;
if(maxNew > max) {
a = (BBVA *) realloc(a, maxNew * sizeof(BBVA));