Skip to main content
deleted 20 characters in body
Source Link
user2173
user2173

world of CS50!

Having issues passing check50's tests for mario. I looked at other issues, including ones that look the same as mine, but I haven't found a solution.

world of CS50!

Having issues passing check50's tests for mario. I looked at other issues, including ones that look the same as mine, but I haven't found a solution.

Having issues passing check50's tests for mario. I looked at other issues, including ones that look the same as mine, but I haven't found a solution.

Adding the solution to the main post
Source Link
Onyx
  • 13
  • 5

SOLUTION: As Kareem pointed out, there were two issues with my code. 

  1. Using a system call in my code: `system("clear");

    Using a system call in my code: system("clear");
    • Removed this line completely. Probably an issue with server rights.
  2. Excluding 0 as a valid user input. My code simply didn't follow all of the instructions.

    Excluding 0 as a valid user input. My code simply didn't follow all of the instructions.
    • Removed the "=""=" in the line } while((num <= 0)||(num > 23));
    • It now reads: } while((num < 0)||(num > 23));

SOLUTION: As Kareem pointed out, there were two issues with my code.

  1. Using a system call in my code: `system("clear");

    • Removed this line completely. Probably an issue with server rights.
  2. Excluding 0 as a valid user input. My code simply didn't follow all of the instructions.

    • Removed the "=" in the line } while((num <= 0)||(num > 23));

SOLUTION: As Kareem pointed out, there were two issues with my code. 

  1. Using a system call in my code: system("clear");
    • Removed this line completely. Probably an issue with server rights.
  2. Excluding 0 as a valid user input. My code simply didn't follow all of the instructions.
    • Removed the "=" in the line } while((num <= 0)||(num > 23));
    • It now reads: } while((num < 0)||(num > 23));
Adding the solution to the main post
Source Link
Onyx
  • 13
  • 5

SOLUTION: As Kareem pointed out, there were two issues with my code.

  1. Using a system call in my code: `system("clear");

    • Removed this line completely. Probably an issue with server rights.
  2. Excluding 0 as a valid user input. My code simply didn't follow all of the instructions.

    • Removed the "=" in the line } while((num <= 0)||(num > 23));

Once both were resolved, check50 returned all green happy faces :)

SOLUTION: As Kareem pointed out, there were two issues with my code.

  1. Using a system call in my code: `system("clear");

    • Removed this line completely. Probably an issue with server rights.
  2. Excluding 0 as a valid user input. My code simply didn't follow all of the instructions.

    • Removed the "=" in the line } while((num <= 0)||(num > 23));

Once both were resolved, check50 returned all green happy faces :)

added 21 characters in body; edited title
Source Link
kzidane
  • 17.7k
  • 3
  • 28
  • 100
Loading
To add <pre> and </pre>
Source Link
Onyx
  • 13
  • 5
Loading
Source Link
Onyx
  • 13
  • 5
Loading