Skip to main content
2 votes
Accepted

Infinite looping in hacker 1 - water

I like that you don't want to use CS50's tools and use tools that you are going to have available everywhere outside of CS50. I was reviewing your code. I tried to solve it with a fflush(stdin) line, ...
Ricardo David Antonetti's user avatar
2 votes

credit.c frustration

1- converting longlong to int causes imprecision since int store 4bytes(32bits) and longlong store 8bytes(64bits) of intger values so you don't need int or float(for floating point numbers) which both ...
Mohamed_Nabil's user avatar
1 vote

PSET 1 Hacker Mario

I had the exact same issue. The output looks correct but it is not. Just ask yourself if you really need what you called "spaces2"
user16657's user avatar
1 vote

Credit Card Test Confusion

Taking the first one through the example in the spec: 3 7 1 4 4 9 6 3 5 3 9 8 4 3 1 Okay, let’s multiply each of the underlined bold digits by 2 7*2 + 4*2 + 9*2 + 3*2 + 3*2 + 8*2 + 3*2 That ...
DinoCoderSaurus's user avatar
1 vote

What is wrong with my hacker mario.c code for pset1?

I would pick small numbers for h (e.g., 1 and 2), determine what the expected results should look like and follow the logic of my code using a pencil and a paper. for example, when h == 1, I should ...
kzidane's user avatar
  • 17.7k

Only top scored, non community-wiki answers of a minimum length are eligible