check50

cs50/problems/2021/x/credit


:) credit.c exists

Log
checking that credit.c exists...

:) credit.c compiles

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

:) identifies 378282246310005 as AMEX

Log
running ./credit...
sending input 378282246310005...
checking for output "AMEX\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 371449635398431 as AMEX

Log
running ./credit...
sending input 371449635398431...
checking for output "AMEX\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 5555555555554444 as MASTERCARD

Log
running ./credit...
sending input 5555555555554444...
checking for output "MASTERCARD\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 5105105105105100 as MASTERCARD

Log
running ./credit...
sending input 5105105105105100...
checking for output "MASTERCARD\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 4111111111111111 as VISA

Log
running ./credit...
sending input 4111111111111111...
checking for output "VISA\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 4012888888881881 as VISA

Log
running ./credit...
sending input 4012888888881881...
checking for output "VISA\n"...
checking for EOF...
checking that program exited with status 0...

:( identifies 4222222222222 as VISA

Cause
expected "VISA\n", not ""

Log
running ./credit...
sending input 4222222222222...
checking for output "VISA\n"...

Expected Output:
VISA
Actual Output:

:) identifies 1234567890 as INVALID

Log
running ./credit...
sending input 1234567890...
checking for output "INVALID\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 369421438430814 as INVALID

Log
running ./credit...
sending input 369421438430814...
checking for output "INVALID\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 4062901840 as INVALID

Log
running ./credit...
sending input 4062901840...
checking for output "INVALID\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 5673598276138003 as INVALID

Log
running ./credit...
sending input 5673598276138003...
checking for output "INVALID\n"...
checking for EOF...
checking that program exited with status 0...

:) identifies 4111111111111113 as INVALID

Log
running ./credit...
sending input 4111111111111113...
checking for output "INVALID\n"...
checking for EOF...
checking that program exited with status 0...

:( identifies 4222222222223 as INVALID

Cause
expected "INVALID\n", not ""

Log
running ./credit...
sending input 4222222222223...
checking for output "INVALID\n"...

Expected Output:
INVALID
Actual Output: