0

# 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. Note: use + operands. public class Program { public static void main(String[] args) { int beer = 64; int whisky = 23; //calculate the sum and output it int sum = beer + whisky ; System.Out.Println(sum); } }

19th Jan 2022, 1:43 PM
Namratha Pillamari
13 Antworten
+ 3
If you put your code in a script and tested it, you could see that it compiles without errors https://code.sololearn.com/c7H0X3cfaMON/?ref=app
19th Jan 2022, 2:42 PM
Lisa
+ 1
System.out.println() You have 2 dots and capital O and capital P
19th Jan 2022, 2:07 PM
Dennis Torhov
+ 1
Namratha Pillamari Check the spellings as Dennis Torhov suggested
19th Jan 2022, 2:15 PM
Lisa
+ 1
public class Program { public static void main(String[] args) { int beer = 64; int whisky = 23; //calculate the sum and output it int sum = beer + whisky ; System.out.println(sum); } }
19th Jan 2022, 2:37 PM
Namratha Pillamari
0
19th Jan 2022, 2:04 PM
Lisa
0
It's not compiling
19th Jan 2022, 2:11 PM
Namratha Pillamari
0
Yes I have checked even though it's not compiling
19th Jan 2022, 2:18 PM
Namratha Pillamari
0
Namratha Pillamari Show your new code and put it in a script on sololearn playground please
19th Jan 2022, 2:36 PM
Lisa
0
public class Program { public static void main(String[] args) { int beer = 64; int whisky = 23; //calculate the sum and output it int sum = beer + whisky ; System.out.println(sum); } } Good Luck
26th Jan 2022, 6:10 AM
0
int sum =beer+ whisky; System.Out.println(sum);
26th Apr 2022, 11:24 AM
Edward Akwesi
0