Questions tagged [population]

The tag has no usage guidance.

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

Llama Population cs 50, first time encountering this error. Terminal keeps letting me type after entering "Ending Size"

So, I think I'm almost there with this problem, just after answering prompt it doesn't return any value, in fact it keeps letting me type. #include <cs50.h> #include <stdio.h> int main(...
Paul B's user avatar
  • 3
0 votes
0 answers
10 views

Hi, My Population program runs correctly on the tests given yet produces repetitive errors as below , is this a printing error on my part?

Checking code it produces these errors even though the program runs fine with all the test examples inputted, here is the results population.c exists population.c compiles ( handles starting values ...
Geoff's user avatar
  • 11
0 votes
1 answer
10 views

Hi all, there is something wrong with my code below , I cant get my head around the compiling errors thanks!

#include <stdio.h> #include <cs50.h> int main(void) { //Prompt for start size int start; do { start = get_int("start: "); } while (start < 9 ); // Prompt for end size int end; ...
Geoff's user avatar
  • 11
0 votes
1 answer
1k views

CS50 Lab 1: Population Growth

I am stuck at this one. I just need somekind of a hint to move on I guess. I do not want to take a look at "Walkthrough". I need help with for loop. I cannot think of any condition that ...
Nervossom's user avatar
0 votes
1 answer
21 views

Submit50 giving different results from manual input

Doing the population growth (Week 1 Lab 1), and here's my code: #include <stdio.h> int main(void) { int start = 0; while (start < 9){ printf("Start size: "); ...
Sunraj Patel's user avatar
0 votes
1 answer
52 views

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

please help me. I don't understand why this is not working I tried to cd pset1 already but it still didn't work. I have been spending a lot of time to figure it out yet I can't. Please help me I would ...
Thiranida Tangjadetanapon's user avatar
1 vote
1 answer
57 views

Pset1 - Population

I'm having trouble with the last bit of code, where the years are calculated and printed. The loop seems to run once fine. If I put in something like 12 to start and want to get 13 it will give me the ...
MaeT's user avatar
  • 13
0 votes
1 answer
135 views

Ive tried many MANY things! why am i getting so many questions wrong with my program?

Messages returned by check50 :) population.c exists :) population.c compiles :) handles starting values less than 9 :) handles ending values less than starting values :( handles decimal number of ...
Sfhuygju T's user avatar
0 votes
1 answer
72 views

Lab "population' Why is it when i put 18 as an end population, the loop for 'start date' is initiated again after there being a condition of (e < s)?

#include <cs50.h> #include <stdio.h> int main(void) { int counter = 0; int apop; int e; // TODO: Prompt for start size do { int s; do { ...
Jovanovic's user avatar
0 votes
1 answer
77 views

population lab compiles , but wrong years

it compiles but wrong years #include <cs50.h> #include <stdio.h> int main(void) { int n,e; do { n = get_int("Start Size:"); } while (n < 9); do ...
Peter Mikhail's user avatar