Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- int count = 0;
- int a = 1 + (int) (Math.random() * 99);
- int guess = 0;
- System.out.println("O jakim numerze mysle jebany pedale");
- while (guess != a) {
- guess = keyboard.nextInt();
- count++;
- if (guess > a) {
- System.out.println("schodz w dol pedale");
- } else if (guess < a) {
- System.out.println("wyzej jebany gowniaku");
- }
- }
- System.out.println("Brawo zajelo ci to az: "
- + count + " proby cwelu");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement