0

This is my current code for water.c

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

//This calculates how many bottles of water is used in the shower

int main (void);
{
    do
    {
        Print("How many minutes is your shower?");
        shower = GetInt();
    }
    while (shower >= 0);

    bottles = shower * 12;

    printf("Minutes: %i \n Bottles: %i \n", shower, bottles);

}

I get this error message

@ide50:~/workspace/pset1 $ make water
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    water.c  -lcs50 -lm -o water
water.c:7:1: error: expected identifier or '('
{
^
1 error generated.
make: *** [water] Error 1

Can anyone see what I am overlooking? This is so frustrating! Thank you in advance

1
  • Same, I also get that
    – David Tang
    Nov 9 '16 at 23:20
1

Try taking away the semicolon after int main (void). From there you will have to go through and fix your other errors, but those should be easier to fix. Just run make and then go through each error one by one. I hope this helps!

If this answers your question, please click the check to accept:)

1
  • If i take away the semi colon it asks me to put one after it. I am still confused
    – R.ouch
    Sep 1 '17 at 11:08

You must log in to answer this question.

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