Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
836 B
4
Indexable
Never
package aaaa;

import java.util.Random;
import java.util.Scanner;

public class aaaaa {

	public static void main(String[] args) 
	{
			int slimeball = 0;
			Random chairdog = new Random();
			int skyfracture = chairdog.nextInt(100) + 1;
			do 
				{
				System.out.println("What is your guess?");
				Scanner Pseudopseudohypoparathyroidism = new Scanner(System.in);
				int gerald = Pseudopseudohypoparathyroidism.nextInt();
				if (skyfracture > gerald) 
				{
					System.out.println("Too low!");
				} 
				else
				{
					if (gerald > skyfracture)
					{
						System.out.println("Too high!");
					}
					else
					{
						System.out.println("Correct! You got the right number in " + slimeball + " guesses!");
						break;
					}
				}
				slimeball++;	
		}while(skyfracture != 101);

	}

}