0

This is my code for pset 1 water. I'm running check50 but it's still rejecting the inputs. I'm not sure where I went wrong.

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

    int main(void)
    {
        int n, bottles;
        int b = 12;
        do
        {
            n = get_int();
        }
        while (n <= 0);
        printf("Minutes: %i\n", n);
        bottles = b * n;
        printf("%i minute equals %i bottles.\n", n, bottles);
    }
1
    expected prompt for input, found none

Check50 was expecting a prompt for input, not for the program to simply wait for input. The code never prints a prompt that says what has to be entered.

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

You must log in to answer this question.

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