Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- System.out.println("\tQuiz time! Lets get started! ");
- System.out.println("Part I: ");
- System.out.println("13 x 2 = 26? (true or false) ");
- String AnsA = input.nextLine();
- System.out.println("100 - 92 = 9 ? (true or false) ");
- String AnsB = input.nextLine();
- System.out.println("12 + 8 = 21? (true or false) ");
- String AnsC = input.nextLine();
- while (AnsA == "true") {
- while (AnsB == "false")
- while (AnsC == "false")
- System.out.println("You answered them all right! you may move on!");
- while (AnsA == "false")
- while (AnsB == "true")
- while (AnsC == "true")
- System.out.println("You answered one of them wrong!!");
- break; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement