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 "0"

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

Expected Output:
4
Actual Output:
0

:( input of 0.01 yields output of 1

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

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"

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 "4"

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

Expected Output:
7
Actual Output:
4

:( input of 23 yields output of 92

Cause
expected "92\n", not "52"

Log
running ./cash...
sending input 23...
checking for output "92\n"...

Expected Output:
92
Actual Output:
52

:( input of 4.2 yields output of 18

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

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...