Я делаю проект для класса, и мне нужна помощь, чтобы понять, какой синтаксис выписать в IntelliJ. Мне нужно, чтобы пользователь мог набирать 1, 2 или 3 и выводить - «Рок для 1», «Бумага для 2», «Ножницы для3.
это командный проект If, Else, Else if, и я изо всех сил пытаюсь это понять.
Вот что я получил до сих пор
public class RockPaperScissors {
/**
* Description: The entry point for all java applications
*
* @param args - not used in this application
*/
public static void main(String[] args) {
//Set and create random number generator
Random random = new Random();
//Assign and create local variables
Scanner consoleIn = new Scanner(System.in);
int computerGuess = random.nextInt(3) + 1;
int userGuess = 0;
String input;
String output;
System.out.println(createCoolHeader());
//Get input from the user, User decides to choose Rock, Paper or Scissors
System.out.print("Select Rock, Paper or Scissors: ");
input = cin.nextLine();