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); } }
14 Respuestas
+ 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
+ 1
System.out.println()
You have 2 dots and capital O and capital P
+ 1
Namratha Pillamari Check the spellings as Dennis Torhov suggested
+ 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);
}
}
0
Please show your code so we can help you!
0
It's not compiling
0
Yes I have checked even though it's not compiling
0
Namratha Pillamari Show your new code and put it in a script on sololearn playground please
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
0
int sum =beer+ whisky;
System.Out.println(sum);
0
samii Please read the previous responses on the thread. This code will give an error.
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);
}
}
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);
}
}
- 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);
}
}