#define WITHDRAWAL 1 #define DEPOSIT 2 #define SUMMARY 3 #define QUIT 4
linux3[1]% gcc -ansi -Wall proj3.c
linux3[2]% a.out
[Your greeting goes here.]
Please enter the beginning balance: 1000.00
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 1
Enter the amount to withdraw: 500.00
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 1
Enter the amount to withdraw: 100.00
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 3
----------------------------------------------------
Account Summary
Beginning balance: $1000.00
Ending balance: $400.00
Total number of withdrawals: 2
Total number of deposits: 0
----------------------------------------------------
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 2
Enter the amount to deposit: 500.00
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 3
----------------------------------------------------
Account Summary
Beginning balance: $1000.00
Ending balance: $900.00
Total number of withdrawals: 2
Total number of deposits: 1
----------------------------------------------------
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 1
Enter the amount to withdraw: 1000.00
********* WARNING: You have a negative account balance *********
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 3
----------------------------------------------------
Account Summary
Beginning balance: $1000.00
Ending balance: $-100.00
Total number of withdrawals: 3
Total number of deposits: 1
----------------------------------------------------
1) Make a Withdrawal
2) Make a Deposit
3) Display Account Summary
4) Quit
Selection: 4
linux3[3]%
Here is a sample submission command. Note that the project name starts with uppercase 'P'.
linux3[4]% submit cs104 Proj3 proj3.c
To verify that your project was submitted, you can execute the following command at the Unix prompt. It will show the file that you submitted in a format similar to the Unix 'ls' command.
linux3[5]% submitls cs104 Proj3