I'm trying to simplify the mario exercise by making my code print the number of hashtags the user inputs for the height without the spaces. Like this:

height 4:

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

int main(void)

    int height;
    do {

        height = GetInt();
    while (height > 23);

    int row;
    row == height + 1

    int i;
    int hashtag;
    int enter;

    for ( i = 0 ; i < height ; i++ ) {

        hashtag == printf("#");

        hashtag = hashtag * row;

        enter == printf("\n");

        enter = 1;

        i == hashtag + enter;

        printf("%i%i", hashtag, enter);


The compiler says there's no rule to make the target mario, and I don't know how to fix it.

1 Answer 1


The complaint from the compiler has nothing to do with your program. Rather you requested to compile an unknown file. Assuming you typed make mario, the cause of the error could be caused by either:

  • You changed the name of your program. Then the correct form would be make NEW_NAME
  • You navigated outside the directory of the file to compile.

To fix the latter, which is what I suspect is causing your troubles; just ensure you're in ~/workspace by typing cd and then type cd pset1, from this point, again type make mario.

You must log in to answer this question.

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