0

i'm unable to run this first step to solving the problem this is what i've entered it won't "make mario" what am i missing?

#include <cs50.h>

#include <stdio.h>

int main(void);

int n;

do

{

n = get_int("positive number: ");

}

while (n < 1);

1 Answer 1

0

The basic structure of the program is incorrect. There should not be a semicolon at the end of the main declaration, and there should be a pair of curly braces surrounding the code that belongs to main(), like this;

#include....    // include statements first

int main(void)
{
    \\ put all the program code between these two curly braces.
}

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

1
  • that works, thx! Commented Dec 16, 2022 at 11:17

You must log in to answer this question.

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