following code is throwing compiling error. I am new to programming and so dont know what else to do. I did as taught in the class but cant get it right. cam anyone please help me solve it?
#include<stdio.h>
#include<cs50.h>
int main(void)
{
int y;
do
{
printf("Minutes: ");
int Minutes = get_int();
}
while(Minutes< 0);
y= Minutes * 12;
printf("Bottles: %i\n", y);
}
it is throwing following error:
water.c:10:8: error: unused variable 'Minutes' [-Werror,-Wunused-variable]
int Minutes = get_int();
^
water.c:12:7: error: use of undeclared identifier 'Minutes'
while(Minutes< 0);
^
water.c:14:4: error: use of undeclared identifier 'Minutes'
y= Minutes * 12;
^
3 errors generated.
make: *** [water] Error 1