#include <cs50.h> #include <stdio.h>

int get_positive_int(void);//new string int main(void)

{ int i = get_positive_int(); //positive number string



int get_positive_int(void)

{ int n;

    n = get_int("%s", "Height: ");

while (n < 1 || n > 8); // number between 1-8

for (int i = 0; i < n; i++) //height


    for (int j = 0; j < n; j++) //width
       if (i + j < n -1) //if the height + width is less than N -1

       printf(" ");




return n;


the ERROR message

~/workspace/pset1/mario/ $ check50 usage: check50 [-h] [-d] [--offline] [-l] [--log] [-o {ansi,json,html} [{ansi,json,html} ...]] [--target TARGET [TARGET ...]] [--output-file FILE] [-v] [-V] [--logout] slug check50: error: the following arguments are required: slug


2 Answers 2


Be sure you use the correct slug for the problem you are doing.

Based on your code, and per the spec:

check50 cs50/problems/2020/x/mario/less

Run that and let us know.


It usually means that you didn't enter the command correctly. The "slug" is the parameter that is input.

  • How would I go about fixing this so I need to restructure my code ? I’m sorry I’m really new and so unsure about this ? Commented Jun 22, 2020 at 12:40
  • This has nothing to do with your code. You need to enter the check50 command correctly. It will be in the instructions for the pset.
    – Cliff B
    Commented Jun 22, 2020 at 22:17
  • i have done it the correct way i double checked and when i try and force it by inputting check50 cs50/problems/2020/x/mario it still will not do it i cannot get my head around it. Commented Jun 24, 2020 at 11:18
  • Me neither. I'm getting the same message. What's a slug and how do I put it in? Commented Jul 18, 2021 at 18:24
  • go to the directory that contains the mario source code. Then use the exact text as indicated in the pset assignment. That means just "mario", not a full path name. Check50 isn't using a path to find the directory and filename. It's using the program name to identify which pset to test and what actions to take.
    – Cliff B
    Commented Jul 18, 2021 at 21:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .