Sunday 3 January 2016

cs50_hacker_problem_set_1

Running credit:
-------------------------------------------------------------------
jharvard@appliance (~/Dropbox/CS50/hacker1/credit): ./credit
Please enter a credit card number.
4012888888881881
VISA
===================================================================
Checking credit:
-------------------------------------------------------------------
jharvard@appliance (~/Dropbox/CS50/hacker1/credit): check50 2014/x/hacker1/credit credit.c
:) credit.c exists
:) credit.c compiles
:) identifies 378282246310005 as AMEX
:) identifies 371449635398431 as AMEX
:) identifies 5555555555554444 as MASTERCARD
:) identifies 5105105105105100 as MASTERCARD
:) identifies 4111111111111111 as VISA
:) identifies 4012888888881881 as VISA
:) identifies 1234567890 as INVALID
:) rejects a non-numeric input of "foo"
:) rejects a non-numeric input of ""
https://sandbox.cs50.net/checks/0dd1e381e3254b7c8dc9060f359a401b


===================================================================
mario.c source code:

No comments:

Post a Comment