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

  Returns a count of the steps through the sort

Please write a c++ implimentation that returns a count of the steps through the sort. (do not worry about updating count, I will rewrite that segemnt. I need help with writing the shell sort.

  Calculates different formulas that converge to the number pi

Write a C program (Care should be taken not to use extensions of C + + language in your work ) that calculates different formulas that converge to the number  pi,  to compare the speed of convergence of these formulas. Each form will be calculated by..

  In psuedocode, design an application

In psuedocode, design an application that has an array of at least 20 integers. It should call a module that uses the sequential search algorithm to locate one of the values

  Dynamically allocates an array large enough

Write a program that dynamically allocates an array large enough to hold a number of test score. The size of the array should be input by the user

  Make a class employee

Make a class EMPLOYEE with a name and salary. Make a class MANAGER inherit from EMPLOYEE. Add an instance field, named DEPARTMENT

  Calculates average of three exams for each student

The program reads the grades for students, calculates average of three exams for each student, and puts out to another file (called Summarygrades.txt) Student ID average and letter grade: example below,

  Calculate the net pay as the gross less the taxes

Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference.

  Function named sort that takes three integer parameter

Write a function named sort that takes three integer parameters by reference. The function should rearrange the parameter values so that the first parameter gets set to the smallest value, the second parameter gets set to the second smallest value, a..

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Implement the guess the word

Implement  the ‘Guess the Word' game in an object-oriented manner

  Write a function to compute the magnitude f

write a function to compute the magnitude F and direction angle of a two-dimensional force F by using two components of the force fx,fy as its parameters,returning F and using the reference to pass theta value .

  Coinflip to prompt for and input a number

Write a program and name it CoinFlip to prompt for and input a number of times to flip a coin, then to output the number of "heads" and the number of "tails" that were flipped.

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