I'm working on PSET1's Water problem. Here's my code:
#include <stdio.h>
int main(void)
{
int m, b;
printf("minutes: ");
scanf("%d", &m);
b = m * 12;
printf("bottles: %d\n", b);
}
Check50 returns the following:
:) water.c exists
:) water.c compiles
:) 1 minute equals 12 bottles
:) 2 minutes equals 24 bottles
:) 5 minutes equals 60 bottles
:) 10 minutes equals 120 bottles
:( rejects "foo" minutes
\ expected prompt for input, not exit code of 0
:( rejects "" minutes
\ expected output, not a prompt for input
:( rejects "123abc" minutes
\ expected prompt for input, not exit code of 0
I've tried everything that I can think of, but I can't seem to crack it. Does anyone have any ideas? Thanks!