Skip to main content

Questions tagged [pset1]

The problem set for Week 1 introduces the C programming language.

0 votes
2 answers
85 views

My code works fine for most of cs50's checks except all AMEX card type checks and some VISA type checks where it just outputs INVALID instead of the actual answer. #include <cs50.h> #include <...
FriedToast's user avatar
0 votes
1 answer
39 views

This is the "pset1" cash assignment. When the user input is and odd number except ending with 5, the code doesn't return anything. Other than that, it works well.
Victor Ukaegbu's user avatar
-1 votes
1 answer
366 views

I am learning C and I am stuck on this, probably because I am dumb but idk #include <stdio.h> int main() { char name[25]; int age; printf("whats your ...
OMAB2infinity's user avatar
1 vote
1 answer
35 views

I'm having trouble figuring out why I'm getting the outputs that I am. I tried to write a function that I can re-use for each denomination of coin, not sure if the problem is there or somewhere else. ...
if_indeed's user avatar
0 votes
1 answer
45 views

// Subtract the value of those quarters from cents cents = cents - (quarters * 25);
Victoria's user avatar
1 vote
2 answers
111 views

I'm currently working on week 6 python and the problem sets are the same to that of pset 1 just with python instead of C. So when I decided to write it I saw that my code in C was extremely bad so I ...
Calapsy's user avatar
  • 13
1 vote
1 answer
55 views

So regarding Pset 1 Credit, I'm having this issue with Check50 My code identifies the card, but there's some error when input given at shorter length: My code are the following: #include <cs50.h&...
Blacov.'s user avatar
  • 11
0 votes
1 answer
169 views

I need some help figuring out how to change the number of spaces on each line of the pyramid. The pyramid comes out with 5 spaces at the beginning of each line instead of 4, then 3 then 2, etc. I ...
AmyG's user avatar
  • 41
0 votes
1 answer
33 views

==> SO I'm wondering, do I really need to record my self ? ==> or what if I don't ?, what's gonna happen, I won't be able to submit successfully ? my problem is I'm not comfortable talking in ...
Oliverson's user avatar
1 vote
1 answer
43 views

I'm using a do..while loop in the get_cents function, which has worked for me in the previous problems. What makes this program incorrect? #include <cs50.h> #include <stdio.h> int ...
Elij's user avatar
  • 21
1 vote
1 answer
82 views

as in the code given below i want to multiply 1 by 2 then delete it and so on but i don't how to do that i made the first steps to delete the last number by using %10 then show it with the /10 i hope ...
Ahmed Hussien's user avatar
-1 votes
2 answers
61 views

Please see attached snippet below. I am having difficulty creating the 'cash' folder or directory. I have followed all the command prompts from 'cd' through 'wget https:' as shown in the cs50 ...
bdxltk35's user avatar
1 vote
1 answer
65 views

The checksum is correct for less than 10 digits but for 14-16 digits it is coming back negative. What am I doing wrong? #include <cs50.h> #include <stdio.h> #include <math.h> int ...
Parth Munjal's user avatar
0 votes
1 answer
56 views

I have a relational comparison unused and my code fails to compile. int get_cents(void) { // TODO int cents = 0; do { cents = get_int("Total cents owed: &...
deertom's user avatar
0 votes
0 answers
61 views

#include <cs50.h> #include <math.h> #include <stdio.h> #include <stdlib.h> int main(void) { long long credit_num; credit_num = get_long_long("credit number: "...
انس رفعت OR. ANAS REFAT's user avatar

15 30 50 per page
1
2 3 4 5
80