Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner input = new Scanner (System.in);
  8.  
  9. System.out.println("\tQuiz time! Lets get started! ");
  10. System.out.println("Part I: ");
  11. System.out.println("13 x 2 = 26? (true or false) ");
  12. String AnsA = input.nextLine();
  13. System.out.println("100 - 92 = 9 ? (true or false) ");
  14. String AnsB = input.nextLine();
  15. System.out.println("12 + 8 = 21? (true or false) ");
  16. String AnsC = input.nextLine();
  17.  
  18. while (AnsA == "true") {
  19. while (AnsB == "false")
  20. while (AnsC == "false")
  21. System.out.println("You answered them all right! you may move on!");
  22.  
  23.  
  24. while (AnsA == "false")
  25. while (AnsB == "true")
  26. while (AnsC == "true")
  27. System.out.println("You answered one of them wrong!!");
  28. break; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement