Ok what im trying to do is have roll 5 dice, keep the ones that are equal off to the side, and roll the remaining ones over again.(like in yahtzee) The info that i have gathered so far is this:

int dice[5];

int again[5]={ 1,1,1,1,1 };

for(int i=0;i<5;i++){
if(again[i]==1)dice[i]=1+rand()%6;

and to roll them over i was told to use: again[i]=0;

I havent got into arrays much yet, so im not sure how to put this stuff together. Is there anyone that could quickly write a small program for me, and post it or email it? If what im trying to do will turn out to be some huge thing, say so and i'll have to think up another game. any tips or ideas will help. thanks a bunch.