Project
Project
Agnik Mandal
Techno India Group Public School
CERTIFICATE
This is to certify that the investigation work entitled:
“CASINO GAME”
Has been conducted out by Agnik Mandal, TIGPS, GARIA
He had submitted the project during the
Academic year 2018-2019
Towards partial fulfillment of requirement of CBSE Board
_______________ ______________
Teacher Head of the institute
(Computer Science)
CONTENTS
Header Files Used
Files Generated
Working Description
Coding
Output Screens
Conclusion
Bibliography
CONCLUSION
The program of Casino Game is designed
successfully and the outputs were generated.
BIBLIOGRAPHY
Websites:
www.google.com
Books:
Computer Science with C++ by Preeti Arora
and Pinky Gupta
FILES GENERATED
Program file:
Casino.cpp
Execution file:
E:\c++\casino.exe
WORKING DESCRIPTION
This program is designed to play casino
game. This is simple text based program.
This game is without graphics to focus on
logic used in the game. Only one player can
play this game.
HEADER FILES USED
#include <ctime>
void rules();
int main()
string playerName;
int bettingAmount;
int guess;
char choice;
drawLine(60,'_');
getline(cin, playerName);
do
system("cls");
rules();
cout << "\n\nYour current balance is $ " << amount << "\n";
do
cout << "Your betting amount is more than your current balance\n"
do
dice = rand()%10 + 1; // Will hold the randomly generated integer between 1 and 10
if(dice == guess)
cout << "\n\nGood Luck!! You won Rs." << bettingAmount * 10;
else
cout << "Bad Luck this time !! You lost $ "<< bettingAmount <<"\n";
cout << "\nThe winning number was : " << dice <<"\n";
cout << "\n"<<playerName<<", You have $ " << amount << "\n";
if(amount == 0)
break;
drawLine(70,'=');
cout << "\n\nThanks for playing game. Your balance amount is $ " << amount << "\n\n";
drawLine(70,'=');
return 0;
}
void rules()
system("cls");
drawLine(80,'-');
drawLine(80,'-');
cout << "\t2. If you win you will get 10 times of money you bet\n";
cout << "\t3. If you bet on wrong number you will lose your betting amount\n\n";
drawLine(80,'-');
// END OF PROGRAM
OUTPUT SCREENS