Creating a simple slot machine using c programming

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

Objective - creating a simple slot machine.

1. The machine should ask the user how much money he/she is willing to Deposit.

2. The machine should ask the user how much money he/she is willing to Bet per each round.

3. The slot machine will display 3 numbers 0, 1, and 2.

4. The choice of these numbers should be decided by rand() function in c.

[How to use rand() function in c a. Num=rand()%3; //This line will generate a number between 0, 1, and 2 and assign the number to Num variable b. rand() requires #include <stdlib.h>

5. The choice of these 3 numbers should be computed outside of main() function - in other words, use the USER defined function.

6. Each round, the Deposit will be deducted by the amount of the Bet

7. When first two numbers match, the user will receive x1 of the Bet

8. When all three numbers match, the user will receive x2 of the Bet. *So, conditions 6, 7, and 8 express the rule of gambling. No matches, you will lose the Bet money (Deposit - Bet) First two numbers match, you will break even (Deposit - Bet + Bet) When 3 numbers match you make some (Deposit - Bet + 2 x Bet)

9. After each round, the user should be prompted whether he/she would like to play more.

10. If the Deposit money runs out, the game should end automatically.

Code in C

Reference no: EM132084494

Questions Cloud

What are some factors that might counter this interpretation : On what grounds might they make this claim, and to what extent do you think this interpretation is accurate?
Write a program that allows the user to enter a tax bracket : How much higher the interest rate must be depends on the investor's tax bracket. Write a program that allows the user to enter a tax bracket .
What were the goals of adolph hitler as laid out : What were the goals of Adolph Hitler as laid out in Mein Kampf? What were the ideological roots of the Nazi Party, and what kind of goals did the party
Discuss about the structured design : When an object-oriented design proceeds to the implementation stage, it is possible that some operations listed in the object table will be implemented.
Creating a simple slot machine using c programming : The machine should ask the user how much money he/she is willing to Bet per each round.
How does the os manage processes : How does the OS manage processes? Be able to name five OS management activities related to processes.
Learn and use bitwise operations within a program : Can find a partner in your class so you can work together to finish the homework. You don't necessarily need to meet each other in face.
Do research and write a paper on structured analysis : Nassi-Shneiderman structure charts (yes, that's Ben Shneiderman, before he became famous for his work in HCI).
What kind of problems faced the german government : What kind of problems faced the German government between 1919 and 1925? How did the way the war ended contribute to the weakness

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