School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
You're Browsing As A Guest! Register Now...
Become an Expert!

Join 358,767 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 3,806 people online right now.Registration is fast and FREE... Join Now!



bingo game!

52 Weeks of Code Challenge: Android

Week #11 of the 52 Weeks of Code Challenge is Android, you should give it a shot. Click Here!

bingo game! I can't help myself with the programe....Please help Rate Topic: -----

#1 bikal  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-June 09


Dream Kudos: 0

Posted 25 June 2009 - 08:43 AM

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 ****************************
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



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