1 vote
Accepted

make: *** No rule to make target 'population'. Stop. for population work

Simple problem. You're in the wrong subdirectory. You need to move to the same directory as the source code file, ie, pset1/Populationn. Remember that directory names are case sensitive and to match ...
  • 64.7k
1 vote
Accepted

Week 4 Memory - Swap

[EDIT: This applies to programming in the C language. See comments and question edit.] The = operator copies values from one place to another. It matters what type of vars are being used. That code ...
  • 64.7k
1 vote
Accepted

Greedy Algorithms PSET1. I wrote this code but at some cases it fails to give the correct output. Can someone please help me.?

A simple oversight error. Look at this code: for (int i = 0; cents >= 25; i++) //Loop to count number of coins needed { coin = 0 + 1; cents = cents - 25; } On each pass through the ...
  • 64.7k
1 vote

Beginner Week 1: Mario brick problem

Remember that what you actually want to print are the characters # and the spaces. Also, a variable defined within a function cannot be called from outside of this curly brackets. Also, decide whether ...
  • 21
1 vote

Beginner with Cash code problem

In the CS50 lab, to the left side of the sandbox, there's documentation, a text walk through and a video walk through. Read through, and watch the video to get a better understanding of the problem. ...
1 vote

Pset Cash CS 50 - need help

I can see a few bugs here - the one causing the infinite loop is your while loop. The condition is while (cents >= 25) but the value of cents never changes/decreases, so this condition will be ...
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible