Thread: Working on a program and am stuck. While loop is not working right.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2016
    Location
    Middleburg, Florida
    Posts
    3

    Working on a program and am stuck. While loop is not working right.

    I am working on a program of blackjack for class. I was to input an menu with my code to allow user to play another round or exit. My first option works. my second option displays another round and then exits. This is my first semester of programming so I am still quite new but need direction. I have attached my code, and also what the stepped question was. Thanks you for your help.

    -Create a while loop that has a condition of (menuChoice != -1).
    -Inside the while loop setup a menu that allows for players to choose 2 options:
    a. 1- Play Blackjack
    b. 0- Exit Program
    -Ask for a player to input a choice and store it in (menuChoice != -1).
    -Update your while loop condition to now be (menuChoice !=0).
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 12-01-2014, 03:00 PM
  2. If Loop Not Working?
    By lilywest in forum C Programming
    Replies: 4
    Last Post: 11-23-2013, 01:42 PM
  3. Can't get do while loop working
    By FernandoBasso in forum C Programming
    Replies: 8
    Last Post: 10-05-2011, 06:36 PM
  4. my do while loop not working
    By rodrigorules in forum C Programming
    Replies: 12
    Last Post: 09-07-2005, 06:52 PM