Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

TOPIC : Programming Fundamentals Lab Final

Project

• Theme:
Game
• Game Name:
Casino
• Submitted to:
Sir Ahsan Ayaz
GROUP MEMBERS
• Nawaz Anjum (439)
• Zara Qasim (444)
• M Zain ul hassan (120)
• Sadat Ali Khan (447)
• Talha Liaqat (434)
Library Files:

• #include <iostream>
• #include <string>
• #include <cstdlib>
• #include <ctime>
Defination and uses:
• #include <iostream>
(It stands for standard input-output stream .Use to
provide control for input output functionality.)
• #include <string>
• #include <cstdlib>
(It is use to store value)
• #include <ctime>
(It is use for timing)
String name:

• int amnt (The total amount you have)


• int bid amnt (The amount you select for bid)
• int guess (For guess the bid num)
• int dice (Here dice is the num you enter for bid)
• char choice (The num you choice)
Program Working:

• First you to enter your name and then the amount you have to
deposit, after this you enter in the main game screen . Control ask you
to enter bid amount. Then It ask you to guess the any num between 1
to 10. When you enter the num you want to bid on , the compiler run
the program code generate any random num as a bid num and
compare it with the num you enter for bid. If it match the with your
num then you win 10x of your bid amount and if you lose then the bid
amount you enter deduct from the deposit amount you save. It ask
you to play again or if you want to play the enter “y” if not then “n”.
Main Point :
How the program code generate any random as winning num of bid?
• srand(time(0)); // Use for Generating Random Number Each Time.
• My program contains code that should generate a random positive
integer number every time I execute it.
This command is use to generating any random num every time you
play the game.

You might also like