0

Answer this question

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //taking initial score int initScore = scanner.nextInt(); int scoreTom = initScore; int scoreBob = initScore; System.out.println("Round 1 results:"); //fix System.out.println(scoreTom++); System.out.println(scoreBob--); } }

12th May 2022, 4:40 PM
Aayan
5 Respostas
+ 2
What is the question? You didn't mention it.
12th May 2022, 4:51 PM
Lisa
Lisa - avatar
+ 1
Read the task description carefully: It is about increment and decrement. Re-read the lesson again and pay attention the the difference between pre- and post-increment. Then look at the given code. The 2 lines that you are supposed to fix are marked by the comment.
12th May 2022, 4:55 PM
Lisa
Lisa - avatar
0
Lisa java 7.2 practical
12th May 2022, 4:52 PM
Aayan
0
Lisa you are genius
12th May 2022, 4:58 PM
Aayan
- 1
Java
12th May 2022, 4:52 PM
Aayan