Padd Solutions

Converted by Falcon Hive

import java.util.Scanner;

public class BasicConditional
{
    public static void main (String[] args)
    {
        int num = 3;
        int num2 = 5;
        String text = "hi";
       
        Scanner scan = new Scanner (System.in);
       
        System.out.println ("Try to guess my secret number: ");
       
        int guess = scan.nextInt ();
        int random = (int) (Math.random () *10 + 1);
       
        if (guess == random)
        {
            System.out.println ("You guess it!");

        }
       

        else
        {   System.out.println ("You kind of suck at this.");
           
        }
       
        System.out.println ("This will happen no matter what.");
    }
}

(0) Comments

Post a Comment