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

Welcome to Dream.In.Code
Become an Expert!

Join 300,372 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,470 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:36 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


modi123_1

RE: Bingo Game!

25 Jun, 2009 - 09:47 AM
Post #2

Suiter #2
Group Icon

Joined: 12 Jun, 2008
Posts: 1,760



Thanked: 72 times
Dream Kudos: 150
My Contributions
A few things.
First kill one of the two threads you created.
Second, is there a question you have?
Third, use the code tags please!

I'll stop by later when you get things cleaned up! smile.gif

This post has been edited by modi123_1: 25 Jun, 2009 - 09:48 AM
User is offlineProfile CardPM
+Quote Post

firebolt

RE: Bingo Game!

26 Jun, 2009 - 01:53 AM
Post #3

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,463



Thanked: 75 times
Dream Kudos: 1675
My Contributions
Please ask the question in the body. Also, like modi123_1 said, code.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 09:12PM

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