School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,401 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,592 people online right now. Registration is fast and FREE... Join Now!




bingo game!

 

bingo game!, I can't help myself with the programe....Please help

bikal

25 Jun, 2009 - 08:43 AM
Post #1

New D.I.C Head
*

Joined: 25 Jun, 2009
Posts: 3

void fillCard ( int card [] [csize] )
{
int num1;
bool samenum;
for ( int col = 0; col < csize ; col++ )
{
for ( int row = 0; row < csize ; row++ )
{


do
{
samenum = false;
num1 = rand ()% 15 + 1 + (15 * col);

for(int check = 0; check < row; check++)
{
if (num1 == card[check][col])
{
samenum = true;
}
}

}
while (samenum);
card[col][row] = num1;
card[2][2] = 0;

}

}
}


//************************ DisplayCard Function *******************************
void displayCard ( int card [][csize] )
{
for ( int col = 0 ; col < csize ; col++ )
{
for ( int row = 0; row < csize ; row++ )

cout <<setw(5)<<card[row][col];
cout<<endl;



} cout<<endl;
}
//****************************** END of DISPLAYCARD ****************************

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 10:19PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month