import java.util.Scanner; public class beraknaTal { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); int resultat, tal1, tal2; System.out.print("Ange ett heltal: "); tal1 = keyboard.nextInt(); System.out.print("Ange ett till heltal: "); tal2 = keyboard.nextInt(); do{ System.out.print(+tal1 + "+" +tal2 +"= "); resultat = keyboard.nextInt(); } while(resultat != tal1 + tal2); System.out.println("You answered right, would you like to continue Yes or No "); String input = keyboard.nextLine(); if (input.equals("No")) System.out.println("Du behöver öva mer matematik"); if (input.equals("Yes")) System.out.println("Då fortsätter vi då");
Why isnt it possible to write yes or no in the console=/?