Skip to main content

Posts

Showing posts from March 8, 2012

C++ Casino Game Project

Description: This C++ program on CASINO GAME is a simple text base game.We have used procedure oriented method to design this game. This program is without grahics to keep program easy for beginners . Player can deposit his money to play. From this amount he can bet on number between 1 to 12. If he win he gets 10 times of money otherwise lost his money. In this project, We have used programming concept like do..while loop, user defined function, library function like randomize(), random() etc. #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> #include<time.h> void draw_line( int n, char ch); void rules(); void main() { int balanceamt,amt,no,dice; char playername[80],ch; clrscr(); draw_line(60,'='); cout<<" \n\n\n\n\t\tCASINO GAME\n\n\n\n "; draw_line(60,'='); cout<<" \n\n\nEnter Your Name : "; gets(playername); cout<<" \n\n\Enter Deposit amount to play game :

C++ TIC TAC TOE GAME PROJECT

  Description: This C++ program on TIC TAC TOE GAME is a simple text base game. This program is without grahics to focus on logic /algorithm used in game. Two players can play this game. #include <iostream.h> #include <conio.h> char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; int checkwin(); void board(); int main() { int player = 1,i,choice; char mark; clrscr(); do { board(); player=(player%2)?1:2; cout << " Player " << player << " , enter a number: "; cin >> choice; mark=(player == 1) ? 'X' : 'O'; if (choice == 1 && square[1] == '1') square[1] = mark; else if (choice == 2 && square[2] == '2') square[2] = mark; else if (choice == 3 && square[3] == '3') square[3] = mark; else if (choice == 4 && square[4] == 

C++ HANGMAN GAME PROJECT

  Description: In the game of Hangman, the computer chooses a word at random from a given list of words. This word is the answer. The player then tries to guess the word, by guessing one letter at a time. Whenever the user guesses a letter that is in the answer, all occurrences of that letter are revealed to the user. The game ends when the user has guessed every letter in the word, before he reaches the allowed number of strikes.   #include <iostream.h> #include <stdlib.h> #include < string .h> #include <conio.h> const int MAXLENGTH=80; const int MAX_TRIES=5; const int MAXROW=7; int letterFill ( char , char [], char []); void initUnknown ( char [], char []); int main () { char unknown [MAXLENGTH]; char letter; int num_of_wrong_guesses=0; char word[MAXLENGTH]; char words[][MAXLENGTH] = { " india ", " pakistan ", " nepal ", " malaysia ", " philippines ", " australia

C++ Supermarket Billing Project

  Description: This C++ menu driven programs on SUPERMARKET BILLING SYSTEM has product class with data members like product no, product name, price, qty, tax, discount. Product details is stored in a binary file . A customer can purchase product and his invoice generated. Administrator can create, modify, view and delete product record. //*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<conio.h> #include<stdio.h> #include<process.h> #include<fstream.h> //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class product { int pno; char name[50]; float price,qty,tax,dis; public : void create_product() { cout<<" \nPlease Enter The Product No. of The Product "; cin>>pno; cout<<" \n\nPlease Enter The N