Write a small program to simulate a raffle

Assignment Help C/C++ Programming
Reference no: EM13166752

Write a small program to simulate a raffle (a gambling game) for a group with 100 members. You can simply identify each member with a no-duplicated ID numbers from 01 to 100. A number ticket with a positive 4-digits integer number will be randomly created and assign to each member in the group. Print out the members' ID# with their number ticket to screen in a two columns table started with a headline.

To simulate the blind drawing game, the program should randomly create a positive 4-digits winning number. The first prize winner should be determined by the ticket number that is nearest or equal to the winning number. Print out the first prize winner's information to the screen. And then, the program should randomly create a second winning number to determine the second prize winner. Print out the second prize winner's information. And then, use the same algorithm to determine the third prize, fourth prize, fifth prize and sixth prize winners as well.

Please use a 1-D array to store the number tickets. Use a blind_drawing() function to determine the winner:

int Blind_drawing(int x, int n)

 

 

Reference no: EM13166752

Questions Cloud

How many shares of common stock : How many shares of common stock are issued and how many shares of common stock are outstanding?
Determine the functional form of phi(t) : Determine the functional form of Phi(t) and the frequency of a pendulum bob whose mass is m and is attached to a massess rod of length l. Assume that the bob oscillates in the limit of small oscillations.
Calculate the molality of a calcium chloride solution : Calculate the molality of a calcium chloride solution prepared by dissolving 69.34 grams of calcium chloride in 638.7 grams of water.
What is its volume at stp : A certain gas has a volume of 200 dm3 at 27oC and 2 atmospheres of pressure. What is its volume at STP?
Write a small program to simulate a raffle : Write a small program to simulate a raffle (a gambling game) for a group with 100 members. You can simply identify each member with a no-duplicated ID numbers from 01 to 100. A number ticket with a positive 4-digits integer number will be randomly cr..
Which of the following has the smallest mass : Which of the following has the smallest mass?
The latest entry into the snack food industry : The latest entry into the snack food industry is a health-conscious offering named Hooks, Wheels, and Ladders. Each box mixes several flavors, such as ranch, cheddar, and salsa. The snack is designed to appeal to kids based on the snack shapes
Which one of the following compounds will be most soluble : Which one of the following compounds will be most soluble in water?
Write a program that generates all the factors of a number : Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Whitewater high school has contracted

Whitewater High School has contracted you to write a program that will read a file of student names and test scores in the formation FIRST NAME LAST NAME: SCORE1 SCORE2 SCORE3, where each of the scores is an integer

  For the employee class make

For the Employee class make sure that no person is underage or too old (less than 16 or greater than 80). Do nothing for the set function if the person's age is out of range.

  Create a bar chart showing the average monthly mean temperat

Write a ++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013. The point of the exercise is to compute the sie and location of the rectangles rather than explicitely hardcode that informat..

  Demonstrate overriding of their getter and setter methods

Organize following animals using classes and virtual function. tigers,crocodile, elephants,pythons,zebras,hawks, chickens,rabbits using at least 3 properties some of the animals share. demonstrate overriding of their getter and setter methods.

  Add a copy constructor

Take the code below and add a copy constructor, assignment operator definition and destructor to the class. These functions have already been started for you.

  C++ pointer function synopsis

C++ pointer Function Synopsis: char *amonthLess(char *dateString) Description: Variable dataString is a valid date in a form of mm/dd/yyyy Given the above information, write a main() program that asks a user to enter a date in a form of mm/dd/yyyy..

  Program that will ask for a month

Write a program that will ask for a month (1-12) and a year (yyyy). the program should then produce a calendar showing the month name and year and have all of the days displayed under it.

  Ng stands for next guess

Where NG stands for next guess and LG stands for last guess. Write a function that calculates the square root of a number using this method. The initial guess will be the starting value of LG .

  Write a program using vectors and iterators

Create a program that uses at least two functions that will be called from your main. This program is a number game program that asks for parts of your phone and after manipulating it mathematically, eventually outputs your entire phone number. The d..

  Consists of an employee''s last name

Each input line consists of an employee's last name, first name, current base salary, total sales and percent commission. For example, in the first input line, the last name of the employee is Thomas, the first name is Andrew, the current base salary..

  What do the loops print

What do the following loops print? Work out the answer by tracing the code, not by using the computer. a. int s = 1; for (int n = 1; n

  Write a function that will take in an array of integers

Write a function that will take in an array of integers, sum up all the values in the array, and return the result to the calling function.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd