Skip to content

Instantly share code, notes, and snippets.

@harveyslash
Created September 8, 2016 03:27
Show Gist options
  • Save harveyslash/a60d5b6ed60ee29a7e09d977844fc8bb to your computer and use it in GitHub Desktop.
Save harveyslash/a60d5b6ed60ee29a7e09d977844fc8bb to your computer and use it in GitHub Desktop.
basicShop.c:7:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
int main(int argc,char *argv[]){
^
gcc -ggdb -std=c99 -Wall -Wextra -pedantic -c shop_utils.c
gcc -ggdb -std=c99 -Wall -Wextra -pedantic -o basicShop basicShop.o shop_utils.o -lm
Test 1: basicShop .10 < input.1
Test 2: basicShop .10 < input.2
Differences in your standard output:
*** ../../hw2/stdout-1.2 2016-08-31 16:55:11.000000000 -0400
--- out.2 2016-09-07 23:27:30.107136409 -0400
***************
*** 1,2 ****
Today's discount is 10.00%.
- The store closed after serving 0 customers.
--- 1 ----
Test 3: basicShop .10 < input.3
Differences in your standard output:
*** ../../hw2/stdout-1.3 2016-08-31 16:55:11.000000000 -0400
--- out.3 2016-09-07 23:27:30.198136848 -0400
***************
*** 1,2 ****
Today's discount is 10.00%.
- The store closed after serving 0 customers.
--- 1 ----
Test 4: basicShop .10 < input.4
Differences in your standard error output:
*** ../../hw2/stderr-1.4 2016-08-31 16:55:11.000000000 -0400
--- eout.4 2016-09-07 23:27:30.294136204 -0400
***************
*** 1,2 ****
error: bad count 0 for customer: NuttinHoney
- error: unexpected input problem.
--- 1 ----
Test 5: basicShop .10 < input.5
Test 6: basicShop .10 < input.6
Test 7: basicShop .10 < input.7
Test 8: basicShop .04 < input.8
Differences in your standard output:
*** ../../hw2/stdout-1.8 2016-08-31 16:55:11.000000000 -0400
--- out.8 2016-09-07 23:27:30.602135210 -0400
***************
*** 0 ****
--- 1,6 ----
+ Today's discount is 4.00%.
+ Customer: Adolf
+ List $ Sale $
+ $ 19.33 $ 18.56
+ Total: $18.56. Savings: $0.77.
+ The store closed after serving 1 customers.
Test 9: basicShop .05 < input.9
Test 10: basicShop .90 < input.10
Test 11: basicShop .91 < input.11
Differences in your standard output:
*** ../../hw2/stdout-1.11 2016-08-31 16:55:11.000000000 -0400
--- out.11 2016-09-07 23:27:30.844142215 -0400
***************
*** 0 ****
--- 1,29 ----
+ Today's discount is 91.00%.
+ Customer: Zoran
+ List $ Sale $
+ $ 39.95 $ 3.60
+ $ 27.49 $ 2.47
+ $ 72.79 $ 6.55
+ $ 127.89 $ 11.51
+ $ 89.29 $ 8.04
+ $ 100.00 $ 9.00
+ Total: $41.17. Savings: $416.24.
+ Customer: Bert
+ List $ Sale $
+ $ 10.00 $ 0.90
+ $ 5.00 $ 0.45
+ $ 7.00 $ 0.63
+ Total: $1.98. Savings: $20.02.
+ Customer: Fred
+ List $ Sale $
+ $ 39.95 $ 3.60
+ $ 27.49 $ 2.47
+ $ 72.79 $ 6.55
+ $ 127.89 $ 11.51
+ $ 89.29 $ 8.04
+ $ 10.00 $ 0.90
+ $ 5.00 $ 0.45
+ $ 7.00 $ 0.63
+ $ 100.00 $ 9.00
+ Total: $43.15. Savings: $436.26.
+ The store closed after serving 3 customers.
Creating submission archive - please wait....
Files being saved:
basicShop.c shop_utils.c shop_utils.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment