Adblock breaks this site

I need help with the program I'm making

Discussion in 'Programming General' started by d great one, Sep 28, 2008.

Thread Status:
Not open for further replies.
  1. d great one

    d great one Apprentice

    Joined:
    Nov 4, 2007
    Posts:
    930
    Referrals:
    2
    Sythe Gold:
    0
    I need help with the program I'm making

    Basically the output would be


    The program is


    I need help, because sometimes when the case has higher value than the banker's offer and I pick 'D' (no deal) I still get to win.

    The main problem is I don't get the right result in winning or losing.

    Please help me.

    If the section forum is wrong, please move and notify me. Thanks.
     
  2. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    I need help with the program I'm making

    I'm not going to fix it for you. I'm going to tell you how to fix it.

    But first of all, don't use the goto statement. If you do, you're practically asking for terrible code.

    http://www.kevinboone.com/ctut_switch.html

    Read up.
     
  3. d great one

    d great one Apprentice

    Joined:
    Nov 4, 2007
    Posts:
    930
    Referrals:
    2
    Sythe Gold:
    0
    I need help with the program I'm making

    Ok, so just give me a hint on how to put the win lost same in the switch/case syntax. Or is it possible to combine switch/case with if else?
     
  4. d great one

    d great one Apprentice

    Joined:
    Nov 4, 2007
    Posts:
    930
    Referrals:
    2
    Sythe Gold:
    0
    I need help with the program I'm making

    I still get a funny random result

     
  5. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    I need help with the program I'm making

    You want to use a switch statement where all of those hideous if/else/if blocks are.
     
  6. d great one

    d great one Apprentice

    Joined:
    Nov 4, 2007
    Posts:
    930
    Referrals:
    2
    Sythe Gold:
    0
    I need help with the program I'm making


    Now I get the right response when I press D, but when I press N, not right response.
     
  7. d great one

    d great one Apprentice

    Joined:
    Nov 4, 2007
    Posts:
    930
    Referrals:
    2
    Sythe Gold:
    0
    I need help with the program I'm making

    This is my latest code. Only made worse. Someone please please please help me out.


    Would be better if you test run it. Would help to figure what went wrong (which I can't really figure). Please someone save me!
     
  8. exapto

    exapto #1 OSRS Magic Training Service
    $50 USD Donor New

    Joined:
    Oct 10, 2008
    Posts:
    645
    Referrals:
    0
    Sythe Gold:
    123
    Vouch Thread:
    Click Here
    Discord Unique ID:
    716746285151027321
    Discord Username:
    exapto#2360
    Homosex
    I need help with the program I'm making

    YES! I got here before anyone else posted a final response!

    Ok, d great one, go to http://bloodshed.net and download the latest version of their C++ Compiler Package. Then, after you unzip and install it, there should be an 'Examples' folder with another folder named 'Jackpot'. Open that up and edit it, it's the closest thing to deal or no deal that i have used.....=)
     
  9. MavFan07

    MavFan07 Member

    Joined:
    Dec 18, 2007
    Posts:
    35
    Referrals:
    0
    Sythe Gold:
    0
    I need help with the program I'm making

    first off why do you have (14-1+1)?...isn't that the same as (14+0) or just 14....anyway...

    your not using the switch right...and you should use variables that better explain instead of arbitrary letters...
     
  10. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    I need help with the program I'm making

    I already solved his problem via PM.

    Useless thread is useless.
     
< how can I block input in a textbox that is not digits or a dot? | ...Connection...?????¿¿¿¿ >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site