#include <cs50.h>
#include <stdio.h>
int main(void) {
printf("How many minutes do you shower for?\n");
int minutes = get_int();
int bottles = minutes * (192/16);
printf("Minutes: %i\n",minutes);
printf("Bottles: %i\n",bottles);
printf("%i minute equals %i bottles.\n", minutes, bottles);
do {
minutes = get_int();
}
while (minutes < 0);
}
这可能是一个简单的问题,但我现在非常困难,并希望得到帮助!
当我使用check50检查代码时,此消息不断弹出:
:) water.c exists.
:) water.c compiles.
:) 1 minute equals 12 bottles.
:) 2 minute equals 24 bottles.
:( 5 minute equals 60 bottles.
timed out while waiting for program to exit
:( 10 minute equals 120 bottles.
timed out while waiting for program to exit
:) rejects "foo" minutes
:) rejects "" minutes
:) rejects "123abc" minutes