1. ## DICE problem!

can someone help me with a small problem on a dice
game?
i have 2 dices or dice!?don't really know the plural and want to throw them
once i have thrown them i want to keap one as it is and
throw the second one again!
i have started with some code:
#include<iostream.h>
#include<stdlib.h>
#include<time.h>

int DICE1()
{
int nDice=rand()%6+1;
cout<<nDice;
return 0;}

int DICE2()
{
int nDice=rand()%6+1;

cout<<nDice;
return 0;}
main()
{
srand((unsigned)time(NULL));
DICE1();
DICE2();
return 0;}

2. Like this?

main()
{
srand((unsigned)time(NULL));
DICE1();
DICE2();
DICE2();
return 0;}

3. NO

THAT would just loop up a nother random number

4. >>i want to keap one as it is and
throw the second one again! <<

So what is it you wanted?

5. ok
i'll give u an example:

let's say the first dices number is a 3 and the second a 4
now i want the player to choose wich dice he wants to keep as it is ex.the first dice which was number 3.
now the first dice number is still a 3 right?.
then the player has to throw just dice number 2 not the first dice

cout<<"which dice do u want to keep";
cin>>thefirst****indice;
cout<<"u choose thefirstmoth..........**indice";
dice1=stillasitwas;
dice2=loopagain;

you see what i mean now?

6. Add two int's to hold the dice returns.
int iDice[2]={0,0}; or int iDice1=0,iDice2=0;
Rename the function DICE() from DICE1() and DICE2() as no need to repeat the code.

after the user has told you which dice they want to keep call DICE() to reroll the other

iDice[0]=DICE();
iDice[1]=DICE();
//find user choice (store as iChoice)
iDice[0]=iChoice;
iDice[1]=DICE();

PS I think the plural IS dice (of die)

7. .

8. Why do you have effectively the same function twice?
Store two numbers:

Code:
```main ()
{
int i;
int d[2];

for (i = 0; i < 2; i++)
d [i] = dice ();

d [1] = dice ();
}

int dice (void)
{
return rand () % 6 + 1;
}```

9. ## Die (singular) Dice (plural)

no no ... You "roll the dice" and you "can't roll a 1 sided die."

not picking at grammar, just thought you'd like to know