New answers tagged

0 votes

how can i get for it reprompt if the user types negative integer or number more 8 . my code does the oppoiste of what i want it to do how do reprompt

Think negatively! Look at the test that the code is doing: while(n <= 8 && n >= 1 ) This checks that n is in the range that is valid. You want the loop to repeat if it isn't in the ...
  • 64.7k
0 votes

cannot compile code

Answer: Notes I forgot to initialize the dimensions #include <stdio.h> #include<cs50.h> int main(void) { int length = get_int("length: \n"); int l = 0; float scores[length]; ...
1 vote
Accepted

cannot compile code

I saw your code and tried to understand it. As Cliff B said you should create the array first, then you can store the values in it. In this case, you haven't initialized the array "scores" ...
1 vote

cannot compile code

The left side of this line is creating an array of floats with "l" elements. The right side is producing a single value. The compiler doesn't know what to do with that. It doesn't know how ...
  • 64.7k
1 vote
Accepted

pset2 - caesar : output is providing extra symbols after specific input cases

The code encrypts the chars from plaintext and stores them in the ciphertext array. But, where is the end of string marker in ciphertext[]? Funny thing about printf() and related functions. They ...
  • 64.7k
0 votes
Accepted

pset2 readability test not calculating correct grade

There are two issues with the code. First,the formula for calculating the grade level isn't quite right. float index = ((0.0588 * l) - (0.296 * s) - 15.8); The result of all that calculating needs to ...
  • 64.7k
0 votes

Cant get Codespace to work

While trying to setup my code space for the first time, it took too long loading so i quited then tried another web browser. While it was loading the second time i gave it as much time as it could ...
0 votes

CS50x finance PSET 9 - quote does not valid ticker symbol expected to find 28.00 and buy page does not have all required elements

looks like this index.html is a copy of login.html so that's why it always goes back to the login page (or seems to!). buy.html page it states that input field shares does not exist in the terminal ...
0 votes

Can not find jpeg..recover problem from cs50 pset4

It's always the little things. ;-) Simple problem. The filename extension is supposed to be "jpg", not "jpeg". Lose the "e" in the filename creation statement. If ...
  • 64.7k
0 votes
Accepted

I can't push refs to github even by force pushing

OK I just found out that there is a button in "CS50 MENU" named "Cleanup Repository" and I clicked on it and it solved my problem.

Top 50 recent answers are included