Questions tagged [hacker1]

The tag has no usage guidance.

6 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
110 views

CS50 PSET 1 Hacker Bad Credit

With this code, I want to "Multiply every other digit by 2, starting with the number’s second-to-last digit, and then add those products' digits together"get the ". I don't get the correct results, ...
0
votes
0answers
166 views

CS50: Bad Credit - pset1 hacker1: Program compiling but not executing

the following code for CS50's hacker edition Bad Credit is compiling but is not executing. Would really appreciate a review: #include<stdio.h> #include<cs50.h> #include<math.h> // ...
0
votes
0answers
258 views

Pset1, Hacker1,Credit.C, error while converting long long into an array

TL;DR Why does METHOD2 below work and not METHOD1?? I'll preface this with saying that after hours of trial and error, I got the code to work. However, I am still VERY CONFUSED as to why one method ...
0
votes
1answer
279 views

Hacker pset1 credit.c always gives invalid?

I tried to attempt the credit.c problem. My code is as follows: #include <stdio.h> #include <cs50.h> #include <math.h> #include <string.h> int main(void) { printf("Please ...
0
votes
0answers
122 views

hacker credit expected output

I'm getting that dreaded "expected output" error when running check50. Thing is, I don't have an added newline \n in my code. The actual output sure appears to be identical to what the checker was ...
0
votes
1answer
503 views

CS50 PSET 1 Hacker Bad Credit Code

The goal is to find if a credit card number is valid. Complete Instructions Here: https://cdn.cs50.net/2015/x/psets/1/hacker1/hacker1.html#bad_credit Can I please know what makes my code fail? (I ...