- 2
Somebody should help me tom score one and bob lose one how should i write initially they have same score
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:"); scoreTom=++initScore; scoreBob=initScore; System.out.println(scoreTom); System.out.println(scoreBob); } }
1 ответ
+ 1
//is this what you are looking..
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:");
//scoreTom=++initScore;
// scoreBob=initScore;
System.out.println(++scoreTom);
System.out.println(--scoreBob);
}
}