Questions tagged [week1]

The tag has no usage guidance.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
2answers
45 views

Can we use math.h and strings.h for credit.c

I can only think of ways to do credit.h using functions from string.h and math.h, but they're not covered in the week's lecture. Are we allowed to use them?
0
votes
0answers
11 views

Can't use the \n command to prompt output one line below

Can't get the \n (e.g., "What's the price?\n" ) to space my $ one line below output, albeit using lecture code. Anyone knows what might be the problem. Regards #include <cs50.h> #...
0
votes
0answers
19 views

cs50 IDE Week 1 submission

I have just finished week 1 and now i m trying to submit it, however I cant seem to do it. How do you submit week one (hello.c) on GitHub? I've looked on GitHub and on the Edx site, but still cant ...
0
votes
0answers
6 views

can I use signed or unsigned instead of int

in minute 1:26 he declares n as int then writes get_postitive_int ,but shouldnt he use unsigned int for positive ? and why does it need a separate function to get positive values since unsigned int ...
0
votes
0answers
27 views

what are questions about my code, the week1 credit assignment

#include <cs50.h> #include <stdio.h> int length(long long n); int lastdigit(long long n); int stay(long long n); int addmutiply(long long n); int odd(long long n); int digit2(long long n);...
0
votes
1answer
37 views

Prompt a user for a number. My code has an endless loop

i am trying to build a code in which the user should input a number between 1-5. In any other case the program should request the user to input a new number. My problem is that the program is going ...
0
votes
1answer
48 views

Trying to change directory in week1 example hello1.c

I am trying to change directory in week1 tutorial example hello1.c, but its showing an error message bash: cd: dropbox: No such file or directory
0
votes
0answers
51 views

Why is -ls stdio.h not used?

During the Week 1 lecture continued at approximately 31 mins in the instructor talks about telling clang to link cs50 into his program. I was wondering why you don't need to tell clang to link in to ...
0
votes
1answer
495 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 ...
0
votes
1answer
40 views

Where can I download “src1m” folder of files used in week 1 lecture?

I want to download and run the files David used in the week 1 lecture, the folder's titled 'src1m'.
-1
votes
2answers
50 views

Week 1 : After using the cp command and copying the file, the duplicate file does not run and prompt appears saying “Nothing can be done”

Week 1 : After copying a file, can a duplicate file be compiled and run?