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
Namratha Pillamari - avatar
14 Réponses
+ 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
Lisa - avatar
+ 1
System.out.println() You have 2 dots and capital O and capital P
19th Jan 2022, 2:07 PM
Dennis Torhov
Dennis Torhov - avatar
+ 1
Namratha Pillamari Check the spellings as Dennis Torhov suggested
19th Jan 2022, 2:15 PM
Lisa
Lisa - avatar
+ 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
Namratha Pillamari - avatar
0
Please show your code so we can help you!
19th Jan 2022, 2:04 PM
Lisa
Lisa - avatar
0
It's not compiling
19th Jan 2022, 2:11 PM
Namratha Pillamari
Namratha Pillamari - avatar
0
Yes I have checked even though it's not compiling
19th Jan 2022, 2:18 PM
Namratha Pillamari
Namratha Pillamari - avatar
0
Namratha Pillamari Show your new code and put it in a script on sololearn playground please
19th Jan 2022, 2:36 PM
Lisa
Lisa - avatar
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
Muhammad Alif Deva Rizqon
Muhammad Alif Deva Rizqon - avatar
0
int sum =beer+ whisky; System.Out.println(sum);
26th Apr 2022, 11:24 AM
Edward Akwesi
0
samii Please read the previous responses on the thread. This code will give an error.
30th May 2022, 3:57 PM
Lisa
Lisa - avatar
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); } }
15th Nov 2022, 7:45 AM
Pooja Patel
Pooja Patel - avatar
0
this ia right answer is here 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); } }
7th Sep 2024, 9:11 AM
Budhabhushan Waghmare
Budhabhushan Waghmare - avatar
- 2
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); } }
30th May 2022, 3:50 PM
samii