This program is to develop a simple lottery program.
Exercise: Write a program that randomly generates a two-digit lottery integer and asks user to guess it. The winner is determined based on following:
- If the user input matches exactly with lottery, the award is $10,000.
- If the user input matches in digits, the award is $5000.
- If one input digits matches with lottery, the award is $2500.
Enter your lottery pick: 34 Lottery is : 17 Sorry. No match.
Enter your lottery pick: 82 Lottery is : 12 Match one digit! You won $2500
Download Code: Lottery
No comments:
Post a Comment