Questions tagged [week1]

The tag has no usage guidance.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
2answers
53 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
1answer
4 views

week 1 no workspace?

I'm trying to get through the first 15minute of the lecture and already lost :( I tried to go through other questions that recommends to find the right ~workspace and ~pset1 but I don't know how to go ...
0
votes
0answers
10 views

problem with credit with this numbers (369421438430814 & 5673598276138003)

I just finished solving the credit problem and regularly used check50 to see my results, and then this happened. check50 sees that these numbers : 369421438430814 5673598276138003 are invalid, even ...
0
votes
0answers
13 views

Week 1 Lab, population, in the area of the calculation of years required to reach threshold i need any help please

#include <cs50.h> #include <stdio.h> int main(void) { int counter = 0; int popinc; int e; // TODO: Prompt for start size int s; do { s = get_int("Start pop: ")...
0
votes
1answer
11 views

No such directory - Week 1

I am unsure why my mario.c and mario are not showing up as directories? I am sure this is a very simple fix. However, I seem to be at a loss of what to do! I would appreciate any feedback! Thank you!!
0
votes
1answer
12 views

Why do I get this “expected expression” error?

Like mentioned in the title, I get this "expected expression" error when I try to convert my amount from float into int type. Am I doing the conversion wrong ? Or is there something else I'm ...
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
1answer
47 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
52 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
54 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
502 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
60 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?