check50

cs50/problems/2022/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...
running clang cash_test.c -o cash_test -std=c11 -ggdb -lm -lcs50...

:) get_cents returns integer number of cents

Log
running ./cash_test 0...
sending input 100...
checking for output "100"...

:) get_cents rejects negative input

Log
running ./cash_test 0...
sending input -10...
checking that input was rejected...

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

Log
running ./cash_test 0...
sending input foo...
checking that input was rejected...

:( calculate_quarters returns 2 when input is 50

Cause
Did not find "2" in ""

Log
running ./cash_test 1...
checking for output "2"...

Could not find the following in the output:
2
Actual Output:

:( calculate_quarters returns 1 when input is 42

Cause
Did not find "1" in ""

Log
running ./cash_test 2...
checking for output "1"...

Could not find the following in the output:
1
Actual Output:

:( calculate_dimes returns 1 when input is 10

Cause
Did not find "1" in ""

Log
running ./cash_test 3...
checking for output "1"...

Could not find the following in the output:
1
Actual Output:

:( calculate_dimes returns 1 when input is 15

Cause
Did not find "1" in ""

Log
running ./cash_test 4...
checking for output "1"...

Could not find the following in the output:
1
Actual Output:

:( calculate_dimes returns 7 when input is 73

Cause
Did not find "7" in ""

Log
running ./cash_test 8...
checking for output "7"...

Could not find the following in the output:
7
Actual Output:

:( calculate_nickels returns 1 when input is 5

Cause
Did not find "1" in ""

Log
running ./cash_test 5...
checking for output "1"...

Could not find the following in the output:
1
Actual Output:

:( calculate_nickels returns 5 when input is 28

Cause
Did not find "5" in ""

Log
running ./cash_test 6...
checking for output "5"...

Could not find the following in the output:
5
Actual Output:

:( calculate_pennies returns 4 when input is 4

Cause
Did not find "4" in ""

Log
running ./cash_test 7...
checking for output "4"...

Could not find the following in the output:
4
Actual Output:

:( input of 41 cents yields output of 4 coins

Cause
Did not find "4\n" in ""

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

Could not find the following in the output:
4
Actual Output:

:( input of 160 cents yields output of 7 coins

Cause
Did not find "7\n" in ""

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

Could not find the following in the output:
7
Actual Output: