Search:

Type: Posts; User: ATB

Search: Search took 0.11 seconds.

  1. [SOLVED] Re: Random number guessing game with three tries (loops)

    yes it does, and to print out the random number if the player loses would be the code below:


    if(hasWon)
    {
    System.out.println("You win");
    System.exit(0);
    }
    }...
  2. [SOLVED] Re: Random number guessing game with three tries (loops)

    sorry. im changing it again now i think this will be good



    package assignment7;

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

    public class Exercise1
  3. [SOLVED] Re: Random number guessing game with three tries (loops)

    to be honest i'm not sure what im doing but i think im missing something
    here is the revised version
    2759
  4. [SOLVED] Re: Random number guessing game with three tries (loops)

    what happens when i try to compile & run

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    Duplicate local variable randomNumber
    randomGenerator cannot be resolved...
  5. [SOLVED] Random number guessing game with three tries (loops)

    hi! this is my first time one a forum and learning code, so please bear with me.
    I was told to write a program which generates a random number between 0 to 5 *including 5*
    and give the user 3...
Results 1 to 5 of 6