Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Lottery program (https://www.askmehelpdesk.com/showthread.php?t=790467)

  • Apr 24, 2014, 06:17 PM
    ahmed166
    Lottery program
    Build a complete java program using JOptionPane that randomly generates a lottery of a three-digit number,prompts the user to enter a three-digit number, and determines whether the user wins according to the following rule:
    a. if the user input matches the lottery in exact order the award is 5,000
    b.if the user input matches three digits in different order, the award is 2,000
    c.if any 1 or 2 digits in the user input matches the lottery the award is 5,00

    Note
    1 if the user keyed in less than three digits or more than 3 digits prompt an error message and urge the user to key in again the numbers.
    2.use widow for input and output.
  • Apr 24, 2014, 06:28 PM
    smoothy
    Since that's a homework assignment. And we don't do your assignment for you. Show us what you have already. And someone can offer advice on the coding.
  • Apr 24, 2014, 07:09 PM
    odinn7
    LOL!!!! You build it and let us know how it works.

    You seriously think someone here is going to do that so you don't have to?

  • All times are GMT -7. The time now is 05:49 AM.