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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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