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

  Output the even numbers from 1 to 10 in ascending order

Output the even numbers from 1 to 10 in ascending order, then the odd numbers from 10 to 1 in descending order: 2 4 6 8 10 9 7 5 3 1. in C++

  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 .

  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.

  Class named realestate that has data members

Create a class named RealEstate that has data members to hold the price of a house, the number of bedrooms, and the number of baths. Member functions include overloaded insertion and extraction operations

  Data from the file grocery.dat

Read the data from the file Grocery.dat and assign values to the 10  GroceryItem  objects. Next display these items to allow a customer to select grocery items from the list and indicate the quantity of that item he or she would like to order. When t..

  Calculates the sum of the cube roots of two integers.

Wrtie a program that calculates the sum of the cube roots of two integers. The program should use the following functions as well as a main funcion. 1) enter one positive value 2) compute the cube root of one integer 3) report the value of two intege..

  Presented a number of recurrence relations

For this problem set, you will be presented a number of recurrence relations and asked to state their actual time complexity, showing your work in the process.

  Array of integers declared-initialized to number of tickets

Array of integers named parkingTickets has been declared and initialized to number of parking tickets given out by city police each day as beginning of current year.

  Recognition of the problem by the hsbc

What problem did the HSBC face in this case? What people, technology, and the organization factors were responsible for problem? Did HSBC management correctly recognize the problem?

  Prepare an arbitrary sinusoidal waveform

Create a program to compute the derivative of an arbitrary input function, with arbitrary duration and arbitrary limits

  Program that will read in such an array

Write a program that will read in such an array, and repeatedly prints it so the user can select the direction in which to move next. The user's requested move can prompt a number of responses

  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

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