Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
The problem set for Week 1 introduces the C programming language.
0
votes
Accepted
PSET1 So my code executes and prompt me for the money owed but that's it..nothing happens. C...
The return statement ends the execution of a function, returning control to the calling function.
In this case your function is main(), so when you call return it will exit your program, passing the v …
0
votes
Accepted
Getting error on cs50 problem set 1 mario "handles a height of 1 correctly,timed out while w...
height -= 1;
If the user passes a value of 1 (which is a value the program is supposed to work with), your code decrements it, making it zero. This is then rejected by your bounds test (height <1), s …
1
vote
pset1 credit solution. code not working but there is no bug
One fundamental issue you'll face is that a credit card number is too long for an int; try using get_long() instead.
I would recommend starting over with your implementation of Luhn's algorithm. Somet …
0
votes
pset1 credit: I am unable to identify what's wrong in the logic of my code?
One thing to consider: in C, ^ is a bitwise-xor operator, not a power-of.