Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by RoyW on 5/22/2016.
- */
- //Imports
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- while (true) {
- Scanner userInput = new Scanner(System.in);
- double Random = Math.random();
- System.out.println("Ask me any Yes or No question");
- System.out.println();
- String User = userInput.nextLine();
- System.out.println();
- System.out.println("The answer I have for you is this: ");
- System.out.println();
- if (Random < 0.05) {
- System.out.println("It is certain");
- } else if (Random < 0.1 && Random > 0.05) {
- System.out.println("It is decidedly so");
- } else if (Random < 0.15 && Random > 0.1) {
- System.out.println("Without a doubt");
- } else if (Random < 0.2 && Random > 0.15) {
- System.out.println("Yes, definitely");
- } else if (Random < 0.25 && Random > 0.2) {
- System.out.println("You may rely on it");
- } else if (Random < 0.3 && Random > 0.25) {
- System.out.println("As I see it, yes");
- } else if (Random < 0.35 && Random > 0.3) {
- System.out.println("Most likely");
- } else if (Random < 0.4 && Random > 0.35) {
- System.out.println("Outlook good");
- } else if (Random < 0.45 && Random > 0.4) {
- System.out.println("Yes");
- } else if (Random < 0.5 && Random > 0.45) {
- System.out.println("Signs point to yes");
- } else if (Random < 0.55 && Random > 0.5) {
- System.out.println("Reply hazy try again");
- } else if (Random < 0.6 && Random > 0.55) {
- System.out.println("Ask again later");
- } else if (Random < 0.65 && Random > 0.6) {
- System.out.println("Better not tell you now");
- } else if (Random < 0.7 && Random > 0.65) {
- System.out.println("Cannot predict now");
- } else if (Random < 0.75 && Random > 0.7) {
- System.out.println("Concentrate and ask again");
- } else if (Random < 0.8 && Random > 0.75) {
- System.out.println("Don't count on it");
- } else if (Random < 0.85 && Random > 0.8) {
- System.out.println("My reply is no");
- } else if (Random < 0.9 && Random > 0.85) {
- System.out.println("My sources say no");
- } else if (Random < 0.95 && Random > 0.9) {
- System.out.println("Outlook not so good");
- } else if (Random < 1 && Random > 0.95) {
- System.out.println("Very doubtful");
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment