check50

cs50/problems/2020/x/cash


:) cash.c exists

Log
checking that cash.c exists...

:) cash.c compiles

Log
running clang cash.c -o cash -std=c11 -ggdb -lm -lcs50...

:( input of 0.41 yields output of 4

Cause
expected "4\n", not "1\n"

Log
running ./cash...
sending input 0.41...
checking for output "4\n"...

Expected Output:
4
Actual Output:
1

:( input of 0.01 yields output of 1

Cause
expected "1\n", not "0\n"

Log
running ./cash...
sending input 0.01...
checking for output "1\n"...

Expected Output:
1
Actual Output:
0

:( input of 0.15 yields output of 2

Cause
expected "2\n", not "0\n"

Log
running ./cash...
sending input 0.15...
checking for output "2\n"...

Expected Output:
2
Actual Output:
0

:( input of 1.6 yields output of 7

Cause
expected "7\n", not "6\n"

Log
running ./cash...
sending input 1.6...
checking for output "7\n"...

Expected Output:
7
Actual Output:
6

:) input of 23 yields output of 92

Log
running ./cash...
sending input 23...
checking for output "92\n"...
checking that program exited with status 0...

:( input of 4.2 yields output of 18

Cause
expected "18\n", not "16\n"

Log
running ./cash...
sending input 4.2...

Expected Output:
18
Actual Output:
16

:) rejects a negative input like -1

Log
running ./cash...
sending input -1...
checking that input was rejected...

:) rejects a non-numeric input of "foo"

Log
running ./cash...
sending input foo...
checking that input was rejected...

:) rejects a non-numeric input of ""

Log
running ./cash...
sending input ...
checking that input was rejected...