- 1

Public class main

>>>>JavaScript<<<< import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int initScore = scanner.nextInt(); int scoreTom = initScore; int scoreBob = initScore; System.out.println ("Round 1 results:"); System.out.println ("6"); System.out.println ("4"); } }

11th Nov 2022, 8:21 AM
MrZ L7 🅥
MrZ L7 🅥 - avatar
2 ответов
+ 3
Pls clearly specify about errors or anything so we can solve all doubt as much as possible
11th Nov 2022, 8:25 AM
Sâñtôsh
Sâñtôsh - avatar
0
This is the Q&A forum Ask your question in the title. Add relevent informarion in the tag. It's a good place to put the language you use. Link your code from the playground so it's easier for us to have a look at it. Add details like expected results in the description. --- Why javascript at the top? this is cleary java code, javascript is entirely different. Anonymous in the tags??? Coding is not hacking, don't pretend to be "Anonymous" while you are just starting out. You take the score from the scanner and assign it to both scoreTom and scoreBob, they will have the same value, you should call the scanner twice: int scoreTom = scanner.nextInt(); int scoreBob = scanner.nextInt(); You are not printing the variable: System.out.println(scoreTom); System.out.println(scoreBob); --- For your next post on the Q&A, make sure that your question is clear and understandable. otherwise it's near impossible to help you out. Ask yourself "Is there enough information?" before posting. I hope this helps :)
11th Nov 2022, 2:36 PM
Apollo-Roboto
Apollo-Roboto - avatar