Saturday, May 22, 2010

Need help C# do while statement?

i have just wrote all this now I have to use a do while statement loop and so sleepy its due in the morning. Could someone help me figure out a fast way to enter it as a do while?


static void Main()


{ string userin;


char selection=' ';


double beginBalance;


double newBalance;


int numChecks=0;


double checkAmount=0;


double depositAmount=0;


int numDeposits=0;


Console.Write("Please enter the beginning check-book balance: ");


userin = Console.ReadLine();


beginBalance = Convert.ToDouble(userin);


newBalance = beginBalance;


while ((selection != 'q' || selection != 'Q')%26amp;%26amp; newBalance %26gt;0)


{


Console.WriteLine("Please enter the type of transaction you would like to make?");


Console.WriteLine("Transaction codes you must enter are as follows:");


Console.WriteLine("D or d Deposit");


Console.WriteLine("C or c Check");


Console.WriteLine("When you have completed entering the transactions please enter Q or q to quit");


userin = Console.ReadLine();

Need help C# do while statement?
CONSIDER YOURSELF REPORTED AGAIN. I really hope no smart programmer is dumb enough to answer your questions. This is ridiculous!


No comments:

Post a Comment