Help urgent

Opening Screen
The program should display a menu from which you chose to play or quit.
Display before the menu the name of the game and let it blink for few seconds.
After the end of each game you need to clear the screen and redisplay the menu.

The Game
Your game is a simulation of tossing a coin and it is formed of five turns for each player (a total of 10 turns).
You start with the human player than the computer player .
At the end of the gem, your program must indicate who the winner is.
In a turn, the program asks the player how many times he wants to toss the three coins together. For example,
In Turn 1 a player may chose to toss the coin twice while in turn 2 he may chose to toss the coin five times.
When the three coins are tossed and the player gets two heads and a tail this should be marked as a successful trial.
By the end of a player’s turn, if he had a successful trial count greater than half his chosen trial number then he
scores 1 point out of 5.
When it is the computer’s turn, let the program print out messages to indicate what the computer is doing.

You must have a least two functions. Make sure to use call-by-reference in one of those functions and also make sure that at least one of them returns back a value to main. Your functions should contain at least 5 lines of code.
You are not allowed to use global variables.
Until you at least try to figure out what you're supposed to do and/or actually write some code, we can't really help you.
#include <iostream>
using namespace std;

void main()
{
int a,b, int head==0,int tail==0;
int choice;
bool menu = true;
cout <<"Please select one of the following options: \n";

cout <<"1: Play\n"
"2: Quit\n";

cout << "Enter your selection (1,2):";
cin >> choice;
return (menu);
}

void main()
{
int flip;

flip= rand() % 2 + 1;// assign random numbers
if (flip == 1)
cout << "The flip was heads." << endl;
head++;
else
cout << "The flip was tails." << endl;
tail++;
//end if
return (flip);
}

for ( int i=0, i<5, i++)
{
cout << "Human turn:" <<endl;
cout<< "how many times do you want to toss the coins:"<< endl;
cin>> a;
}

for ( int j=0 ,j<5, j++)
{
cout<< "computer turn:" << endl;
cout<< "How many times do you want to toss the coins:" <<endl;
cin>> b;
cout << "flip:" << endl;
}


how to move on ?! i am stuck in
For a start, use code tags when you post code here, to make it more readable.

You have two main functions. How can that possibly work? Which one will be the entry point for your program?
Your code won't compile at all, and your two main functions, which are declared void, are returning values. You need to put your if statements in proper brackets, and you also need to fix your functions so that you have only one main function. The code at the end of your post isn't even in a function...
Topic archived. No new replies allowed.