+ 1
Java Primitive Operators - Once in the bar
Hi, I'm trying to solve the code coach "Once in the bar" but its not working... "A bartender sold 64 bottles of beer and 23 bottles of whisky. You need to calculate how many total bottles are sold. Task Calculate and output the total number of sold bottles." this is my code: public class Program { public static void main(String[] args) { int beer = 64; int whisky = 23; //calculate the sum and output it int bottles = beer + whiskey; System.out.println(bottles); } } can someone help me and show me what I did wrong?
3 ответов
+ 2
In the line
int whisky = 23; spelling of whisky is wrong
+ 2
You need to take input and assign the input values to the variables beer and whiskey. Review the Java lessons related to accepting input. Fix spelling errors on variables.
+ 2
oh yes my bad, thank you very much!