Bingo Card Program. Any input?

This is a discussion on Bingo Card Program. Any input? within the C++ Programming forums, part of the General Programming Boards category; http://i31.tinypic.com/350mh5w.jpg If you can't read it let me know (click to inlarge)but it is a bingo card and it generates ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    18

    Bingo Card Program. Any input?

    http://i31.tinypic.com/350mh5w.jpg

    If you can't read it let me know (click to inlarge)but it is a bingo card and it generates random numbers in each row with FREE being in the middle and never changing. B is 1-15 I 16-30 and so on like a bingo card. What additions could I make to improve it. Thanks

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    • You'll never get to the numbers 15, 30, 45, 60, or 75.
    • I don't know why you think printing "" will do anything for you.
    • If you print out B-8 twice, will they be able to mark both of them off when the number comes up? (IOW, you're not controlling for getting the same number twice in a column.)

  3. #3
    The larch
    Join Date
    May 2006
    Posts
    3,573
    What else do you want it to do?

    What I can see is that you might be able to remove some code reduplication and ensure that any line won't contain the same number twice.

    As a hint, you don't need to end a statement after endl and can just carry on couting with <<.

    And if you have more code, perhaps consider showing it as text and not as a picture.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  4. #4
    Registered User
    Join Date
    Jan 2008
    Posts
    18
    Quote Originally Posted by tabstop View Post
    • You'll never get to the numbers 15, 30, 45, 60, or 75.
    • I don't know why you think printing "" will do anything for you.
    • If you print out B-8 twice, will they be able to mark both of them off when the number comes up? (IOW, you're not controlling for getting the same number twice in a column.)
    teacher said to exclude the rule of having 2 numbers in a column. Also not having "" the program will not compile and run.

  5. #5
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Also not having "" the program will not compile and run.
    That's because then you'd have << twice in a row without nothing in between. Why don't you simply remove the extra << from the end of the lines?
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  6. #6
    Registered User
    Join Date
    Jan 2008
    Posts
    18
    Quote Originally Posted by anon View Post
    That's because then you'd have << twice in a row without nothing in between. Why don't you simply remove the extra << from the end of the lines?
    thanks your right. I am in an intro class so just learning right now. Reason I had that was because I had it all written out like in 1-2 lines then decided to split it up into separate lines.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Utter newb?: Program crashes after input
    By deductible in forum C++ Programming
    Replies: 5
    Last Post: 12-13-2008, 10:27 PM
  2. Catching all input and sending it to another program
    By RedWind in forum C Programming
    Replies: 13
    Last Post: 09-15-2008, 01:51 PM
  3. Program that requests input of an integer number
    By theejuice in forum C Programming
    Replies: 6
    Last Post: 04-30-2008, 03:18 AM
  4. Blackjack
    By Tommo in forum C Programming
    Replies: 10
    Last Post: 06-20-2007, 09:07 PM
  5. Replies: 1
    Last Post: 08-11-2006, 06:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21