#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


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 ? – Zoey Herbst Jun 22 '20 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 Jun 22 '20 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. – Zoey Herbst Jun 24 '20 at 11:18

You must log in to answer this question.

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