Skip to content

Commit 6f3cedd

Browse files
committed
.
1 parent 83e3606 commit 6f3cedd

File tree

6 files changed

+43
-43
lines changed

6 files changed

+43
-43
lines changed

builds/Linux/Bank_Simple_C

100755100644
File mode changed.

builds/Linux/CMakeFiles/3.26.3/CMakeDetermineCompilerABI_C.bin

100755100644
File mode changed.

builds/Linux/CMakeFiles/3.26.3/CompilerIdC/a.out

100755100644
File mode changed.

builds/macOS/Bank_Simple_C

100755100644
File mode changed.

builds/macOS/CMakeFiles/3.26.3/CMakeDetermineCompilerABI_C.bin

100755100644
File mode changed.

main.c

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
#include <stdio.h>
2-
#include <stdlib.h>
3-
#include "BankAccount.h"
4-
5-
int main() {
6-
BankAccount *john = create_account("John Doe", 500.0);
7-
BankAccount *jane = create_account("Jane Doe", 500.0);
8-
9-
printf("\nInitial Balances:\n");
10-
printf("-----------------------\n");
11-
display_account(john);
12-
display_account(jane);
13-
14-
printf("\nTransactions:\n");
15-
printf("-----------------------\n");
16-
17-
printf("Depositing $200.00 into John Doe's account:\n");
18-
deposit(john, 200.0);
19-
20-
printf("Depositing $1.00 into Jane Doe's account:\n");
21-
deposit(jane, 1.0);
22-
23-
printf("Withdrawing $700.00 from John Doe's account:\n");
24-
withdraw(john, 700.0);
25-
26-
printf("Withdrawing $239.00 from Jane Doe's account:\n");
27-
withdraw(jane, 239.0);
28-
29-
printf("Attempting to withdraw $50.00 from John Doe's account:\n");
30-
withdraw(john, 50.0);
31-
32-
printf("Withdrawing $50.00 from Jane Doe's account:\n");
33-
withdraw(jane, 50.0);
34-
35-
printf("\nFinal Balances:\n");
36-
printf("-----------------------\n");
37-
display_account(john);
38-
display_account(jane);
39-
40-
free(john);
41-
free(jane);
42-
43-
return 0;
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
#include "BankAccount.h"
4+
5+
int main() {
6+
BankAccount *john = create_account("John Doe", 500.0);
7+
BankAccount *jane = create_account("Jane Doe", 500.0);
8+
9+
printf("\nInitial Balances:\n");
10+
printf("-----------------------\n");
11+
display_account(john);
12+
display_account(jane);
13+
14+
printf("\nTransactions:\n");
15+
printf("-----------------------\n");
16+
17+
printf("Depositing $200.00 into John Doe's account:\n");
18+
deposit(john, 200.0);
19+
20+
printf("Depositing $1.00 into Jane Doe's account:\n");
21+
deposit(jane, 1.0);
22+
23+
printf("Withdrawing $700.00 from John Doe's account:\n");
24+
withdraw(john, 700.0);
25+
26+
printf("Withdrawing $239.00 from Jane Doe's account:\n");
27+
withdraw(jane, 239.0);
28+
29+
printf("Attempting to withdraw $50.00 from John Doe's account:\n");
30+
withdraw(john, 50.0);
31+
32+
printf("Withdrawing $50.00 from Jane Doe's account:\n");
33+
withdraw(jane, 50.0);
34+
35+
printf("\nFinal Balances:\n");
36+
printf("-----------------------\n");
37+
display_account(john);
38+
display_account(jane);
39+
40+
free(john);
41+
free(jane);
42+
43+
return 0;
4444
}

0 commit comments

Comments
 (0)