Member Avatar for srentrop
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DiceRollTwo
{
    class Program
    {
        static void Main(string[] args)
        {
            // Declare and initialize variables.
            Int32 intDiceOne = 0;
            Int32 intDiceTwo = 0;
            Random rnd = new Random();
            String sResponse = String.Empty;

            // Greet the user.
            Console.WriteLine("\n\tWelcome to Vegas Dice Roller!");
            Console.WriteLine("\n\tLet's get started!");
            Console.WriteLine();

            // Start the loop for dice rolls, rolling two dice at a time


                // Generate the two values randomly (1 - 6, inclusive)



                // Call the ShowDice method, sending the two values into it, so it can display the roll


                // Ask the user if he wants to roll again.


                // If he answers anything other than "Y" or "N", ask him again.
                sResponse = Console.ReadLine().ToUpper();
                while ((sResponse != "Y") && (sResponse != "N"))
                {
                    Console.WriteLine("I'm sorry but I didn't understand your response.");

                    Console.Write("Would you like to roll again (Y or N)? ");

                    // Obtain user's response and store in the string variable
                    sResponse = Console.ReadLine().ToUpper(); // no change needed
                }
                while (sResponse == "Y") ;

                // Loop again if the user answers "Y" to the question "roll again?"
                PauseCode("Press <enter> to exit this fun program!");
            }

            } 

        static void PauseCode(String sMsg)
        {
            Console.WriteLine();
            Console.WriteLine(sMsg);
            Console.ReadLine();
        }

        static void ShowDice(Int32 intValue, Int32 intOtherValue)
        {
            if ((intValue == 1) && (intOtherValue == 1))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            if ((intValue == 1) && (intOtherValue == 2))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            if ((intValue == 1) && (intOtherValue == 3))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            if ((intValue == 1) && (intOtherValue == 4))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            if ((intValue == 1) && (intOtherValue == 5))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            if ((intValue == 1) && (intOtherValue == 6))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 2) && (intOtherValue == 1))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 2) && (intOtherValue == 2))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 2) && (intOtherValue == 3))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 2) && (intOtherValue == 4))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 2) && (intOtherValue == 5))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 2) && (intOtherValue == 6))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 3) && (intOtherValue == 1))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 3) && (intOtherValue == 2))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 3) && (intOtherValue == 3))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 3) && (intOtherValue == 4))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 3) && (intOtherValue == 5))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 3) && (intOtherValue == 6))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 4) && (intOtherValue == 1))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 4) && (intOtherValue == 2))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 4) && (intOtherValue == 3))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 4) && (intOtherValue == 4))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 4) && (intOtherValue == 5))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 4) && (intOtherValue == 6))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 5) && (intOtherValue == 1))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 5) && (intOtherValue == 2))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 5) && (intOtherValue == 3))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 5) && (intOtherValue == 4))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 5) && (intOtherValue == 5))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 5) && (intOtherValue == 6))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 6) && (intOtherValue == 1))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|       |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("|       |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 6) && (intOtherValue == 2))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 6) && (intOtherValue == 3))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("|     o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o     |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 6) && (intOtherValue == 4))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|       |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 6) && (intOtherValue == 5))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|   o   |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
            else if ((intValue == 6) && (intOtherValue == 6))
            {
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
                Console.WriteLine(".-------.");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("| o   o |");
                Console.WriteLine("|_______|");
                Console.WriteLine();
            }
        }
    }

You have posted a large block of code. What is your actual issue? Most on the forum don't have the time to try and guess the issue themselves.

Member Avatar for srentrop

I need help with the loop and using the showdice method

Okay to start with I will point you in the right direction for what you want to do and then if you have issues post them back and we will look at them.

Work is absolutely mad for me today and its already half 6 in the evening and don't think I will be out of here before 8pm so will reply when possible.

Anyway...

            // Greet the user.
            Console.WriteLine("\n\tWelcome to Vegas Dice Roller!");
            Console.WriteLine("\n\tLet's get started!");
            Console.WriteLine();
            // Start the loop for dice rolls, rolling two dice at a time

            // ##You will make a while loop here which just uses the value 'true' so it never ends

                // Generate the two values randomly (1 - 6, inclusive)

                // ##See this link http://stackoverflow.com/questions/2706500/how-to-generate-random-int-number
                // ##Store the numbers as parameters

                // Call the ShowDice method, sending the two values into it, so it can display the roll

                // ## Call ShowDice using the parameters made above. ie. ShowDice(paramNumOne, paramNumTwo)

                // Ask the user if he wants to roll again.

                // ##Write to the console like you have done at the start of program

                // If he answers anything other than "Y" or "N", ask him again.

                sResponse = Console.ReadLine().ToUpper();
                while ((sResponse != "Y") && (sResponse != "N"))
                {
                    Console.WriteLine("I'm sorry but I didn't understand your response.");
                    Console.Write("Would you like to roll again (Y or N)? ");
                    // Obtain user's response and store in the string variable
                    sResponse = Console.ReadLine().ToUpper(); // no change needed
                }

                // ##This while below doesnt need to exist
                // ##Using an if statement check if sResponse equals 'Y'
                // ##If it does then use the 'break' command to exit the main loop we made near the top

                while (sResponse == "Y") ;
                // Loop again if the user answers "Y" to the question "roll again?"
                PauseCode("Press <enter> to exit this fun program!");
            }

Sorry if anything is unclear the reply is slightly rushed, do not hesitate to ask for clarification.

Like to comment on your ShowDice method.
Nice drawings btw. but with two dice, this goes up to 36 pracically the same drawings. Imagine what would happen if you wanted a 3-dice game ....
So there is lots of double code use. Whenever you see that, an alarm in your head must go of and think: METHOD!
Here is what I propose:

static void Main(string[] args)
        {
            //your main here
        }

        static void ShowDice(Int32 intValue, Int32 intOtherValue)
        {
            //....

            //your if statements now look like this:
            if ((intValue == 1) && (intOtherValue == 2))
            {
                ShowFace1();
                ShowFace2();
            }

            //....

        }

        static void ShowFace1()
        {
            Console.WriteLine(".-------.");
            Console.WriteLine("|       |");
            Console.WriteLine("|   o   |");
            Console.WriteLine("|       |");
            Console.WriteLine("¨-------¨");
            Console.WriteLine();
        }

        static void ShowFace2()
        {
            Console.WriteLine(".-------.");
            Console.WriteLine("|     o |");
            Console.WriteLine("|       |");
            Console.WriteLine("| o     |");
            Console.WriteLine("¨-------¨");
            Console.WriteLine();
        }

        //Add here the methods for the four other faces

        //As alterative, you could make 1 method with a parameter 1 to 6
        //Use a switch case statement to show the faces depending on the parameter
    }

Now you have only 6 drawings and no matter how many dice, you will always have 6 drawings.Hope it helps. :)

Member Avatar for srentrop

Thanks for your help with my last project. It help me tremendously with my understanding.

Can you take a look at this next project? I wrote the program, and everything works except my loop. Can you help me out with this? Thanks!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AtmProject
{
    class Program
    {
        static void Main(string[] args)
        {
            // Declare an initialize variables
            string sChoice = String.Empty;
            string sResponse = String.Empty;
            Double bBal = 500.00; 
            Double aDeposit = 0.0;
            Double nBal = 0.0;
            Double aWithdraw = 0.0;

            do
            {
                // Show the menu
                ShowMenu();
                // Get the user's choice and store it in a string as an upper case letter
                sChoice = Console.ReadLine().ToUpper();
                // This validates that the user made a correct choice
                while ((sChoice != "A") && (sChoice != "B") && (sChoice != "C") && (sChoice != "X"))
                {
                    Pause("Please enter a choice from the menu!");
                    ShowMenu();
                    //sChoice = Console.ReadLine().ToUpper;
                }
                // Based on the user's choice, switch to the correct segment
                switch (sChoice)
                {
                    // in case they choose A
                    // Ask for an amount
                    // Obtain the amount and store it as a string
                    case "A":
                        Console.Write("\n\tPlease enter the amount to deposit.  ");
                        sResponse = Console.ReadLine();
                        // try to convert the amount to a value of type double and store it
                        try
                        {
                            aDeposit = Convert.ToDouble(sResponse);
                            // Add the amount to the current balance
                            nBal = Convert.ToDouble(bBal + aDeposit);

                            // Tell the user his new balance
                            Console.WriteLine("\n\tYour new balance is {0}", nBal);
                        }
                        catch (Exception ex)
                        {
                            // if there is an error, catch it and close the program
                            Console.WriteLine("\n\t" + ex.Message);
                            Pause("\n\tInvalid amount. This transcation is cancelled...");
                            return;
                        }
                        break;
                    // in case the choose B
                    // Ask for an amount
                    // obtain the amount and store it as an amount
                    case "B":
                        Console.Write("\n\tPlease enter the amount to withdraw.  ");
                        sResponse = Console.ReadLine();
                        // try to convert the amount to a value of type double and store it
                        try
                        {
                            aWithdraw = Convert.ToDouble(sResponse);
                            // subtract the amount from the current balance
                            nBal = (bBal - aWithdraw);
                            // tell the user his new balance
                            Console.WriteLine("\n\tYour new balance is {0}", nBal);
                        }
                        catch (Exception ex)
                        {
                            // if there is an error, catch it and close the program
                            Console.WriteLine("\n\t" + ex.Message);                  
                            Pause("\n\tInvalid amount. This transcation is cancelled...");
                            return;

                        }
                        break;
                    // in case they choose C
                    // just tell the user his balance
                    case "C":
                        Console.WriteLine("\n\tYour current balance is {0}", bBal);
                        break;
                    // in case they choose X
                    // tell the user goodbye
                    case "X":
                        Console.WriteLine("\n\tThanks for banking with us.");
                        Console.WriteLine("\n\tHave a nice day!!");
                        return;

                    default:
                        Pause("Invalid selection. This transcation is cancelled...");
                        return;

                }
            // keep looping while the user's choice isn't X
            } while (sResponse == "A" );
            Pause("\n\tHave a nice Day!!");
        }

        static void Pause(String s)
        {
            Console.WriteLine("\n\t" + s);
            Console.WriteLine("\n\tPress <enter> to Continue.");
            Console.ReadLine();
        }

        static void ShowMenu()
        {
            Console.Clear();
            Console.WriteLine("\n\n\tBanking Application Basic Menu");
            Console.WriteLine("\n\tA) Deposit Funds");
            Console.WriteLine("\tB) Withdraw Funds");
            Console.WriteLine("\tC) Check Balance");
            Console.WriteLine("\n\tX) Exit The System");
            Console.Write("\n\tSelect an option: ");
        }
    }
}

By preference, you should post this new question in a new thread.
What exactly is not working in your loop?
Perhaps this snippet I wrote some time ago might shed a licht.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.