Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 9E

Create a lottery game application named Lottery. Generate three random numbers, each between 1 and 4. Allow the user to guess three numbers. Compare each of the user’s guesses to the three random numbers, and display a message that includes the user’s guess, the randomly determined three-digit number, and the amount of money the user has won as follows:

Chapter 4, Problem 9E, Create a lottery game application named Lottery. Generate three random numbers, each between 1 and  

Make certain that your application accommodates repeating digits. For example, if a user guesses 1, 2, and 3, and the randomly generated digits are 1, 1, and 1, do not give the user credit for three correct guesses-just one.

Blurred answer
Students have asked these similar questions
In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to determine a moving object’s kinetic energy:KE = 1/2 mv2In the formula KE is the kinetic energy, m is the object’s mass in kilograms, and v is the object’s velocity in meters per second. Create an application that allows the user to enter an object’s mass and velocity and then displays the object’s kinetic energy. The application should have a method named KineticEnergy that accepts an object’s mass (in kilograms) and velocity (in meters per second) as arguments. The method should return the amount of kinetic energy that the object has.
Write a tkinter application that asks the user to create their own pizza. First, they should enter their name. Then, allow them to pick one of three crusts (thin, regular, deep dish), one of three sauces (Regular, BBQ, Alfredo), and any number of 3 toppings (Pepperoni, Olives, Mushroom). They should also pick if they want a small, medium, or large pizza. When the submit button is clicked, calculate the total cost ($10 base price, $0.50 for each topping, and $1.50 for each increase in size larger than small).  Once the total is calculated, display a messagebox that thanks the user (by name) for their order and prints out the total cost.
Professor Zak allows students to drop the four lowest scores on the ten 100-point quizzes she gives during the semester. Design an application that accepts a student name and 10 quiz scores. Output the student's name and 10 quiz scores. Output the student's name and total points for the student's six highest-scoring quizzes. Modify the application so that the student's mean and median scores on the six best quizzes are displayed.

Chapter 4 Solutions

Microsoft Visual C#

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
CPP Function Parameters | Returning Values from Functions | C++ Video Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=WqukJuBnLQU;License: Standard YouTube License, CC-BY