Questions tagged [problem-set-1]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

problem set cash: why am I getting really high numbers in my return?

I'm very new to coding and I'm stuck on the cash problem set. It keeps returning a very high number and not returning cash. my code is below #include <cs50.h> #include <stdio.h> int ...
faeyb's user avatar
  • 7
0 votes
2 answers
32 views

Mario-less Style50 problem, the test is wrong, how to solve

The problem is that style50 highlights the printf(" "); function, everything works, if there is printf("-"); it doesn't say anything, but i need there space not a line. }
AAG MONCH's user avatar
0 votes
1 answer
18 views

No response from Terminal

I was just trying out the problem set 1 and encountered a problem #include <cs50.h> #include <stdio.h> int main(void) { // TODO: Prompt for start size { int start; do {...
LJH's user avatar
  • 1
1 vote
2 answers
241 views

Stumped on PSET 1 Mario Less Comfortable

I've been working on this for a while and feel stuck. I think that my "for" loops might be out of order or some other issue. Suggestions? Thanks
Patsy Lin's user avatar
0 votes
1 answer
244 views

CS50 problem set 1 cash

#include <stdio.h> #include <math.h> #include <cs50.h> int main(void) { // Get float for cents // Take inputs of positive floats and repromt user for negative float ...
Nick's user avatar
  • 3
0 votes
1 answer
97 views

Cash Program not returning correct value for .41

I'm working on the Cash program in Week 2 and I think I have it all finished up the only problem is when I run check50 I get everything right except for .41 instead of returning 4 coins it gives an ...
Dre Johnson's user avatar
0 votes
2 answers
63 views

Nothing prints in Mario Problem

Why is the condition in my code not being met? I did clang mario.c and there was no error message. Then I did make mario and proceeded to start compiling my code yet every number from 1 to 8 leads the ...
Rayray94's user avatar
0 votes
1 answer
53 views

Problem set 1 Mario variable issue

I've been staring at my computer for so long trying little tweeks to fix the error message. TLDR how do I stop the shadow message from appearing and initialize variable h? The image looks confusing ...
Rayray94's user avatar
0 votes
1 answer
54 views

i am working on problem set1 Cash. "else if" is not working

everything is working fine until the condition of remainder <= 5 is met (else if) then it just executes the first part only (if). #include <stdio.h> #include <math.h> #include <cs50....
SELKERDANY's user avatar
0 votes
1 answer
35 views

Can I use if-statement or switch-statement instead of a for loop!

I just want to know if it is possible to use conditions instead of loop in the problem set 1 (Mario), because I think that it's easier to get to the intended output without much code!?
Zakaria Bennane's user avatar
0 votes
1 answer
102 views

continue from 2018 to 2019

I had submitted problem Sets 0 – 7 last year, except problem set 4 (0-3) (5-7), problem set 8 and the final project. what should I do?
Magdi Mohammed's user avatar
1 vote
2 answers
76 views

mario.c (comrfortable) error code

I ran the test and it was an error #include <cs50.h> #include <stdio.h> int Height; int space; int hash; int rows; int main(void) { do { printf("Welcome to Mario, ...
Yahunatan Zackarny's user avatar
0 votes
1 answer
645 views

Stuck on Problem set 1! (greedy.c)

I've been trying to solve this problem for a while but I am completely stuck, so thought I'd ask for help. This is what I have so far: #include <stdio.h> #include <cs50.h> int main(void)...
Mackenzie Norton's user avatar
0 votes
1 answer
182 views

Code check for bad credit pset1

This is my attempt for the bad credit problem in pset1 and I'm having trouble debugging my code. Any help would be appreciated. #include <stdio.h> #include <cs50.h> bool checksum(long ...
user34304's user avatar
  • 141
1 vote
1 answer
71 views

Problem set 1 Greedy My code is wrong... Way?

#include <stdio.h> #include <cs50.h> #include <math.h> int main(void) { float f; int y; // User block do{ printf("How much change do you ...
Nikolay Petrov's user avatar
2 votes
2 answers
2k views

Hello world error

I was trying to make this simple Hello World program, however I receive the following errors. Someone can explain me why? Program: #include <cs50.h> #include <stdio.h> int main (void) { ...
Simon's user avatar
  • 23
0 votes
3 answers
578 views

cs50 Problem Set 1: Greedy. float 0.01 problem

sorry for the long title I'm currently doing cs50's problem set 1's Greedy and I've run into an issue. It seems that every cent works except for one's that need to use .01 cent. I've changed my code ...
Domas Kalinauskas's user avatar