how to make a input when a while loop is in operation?

Posted by Shameer.Ali87 under C# on 6/27/2012 | Points: 10 | Views : 846 | Status : [Member] | Replies : 4
how to make a input when a while loop is in operation and to continue the operation after the input..

I am doing a console application in c#,
the application starts with a cricket over, each over has 6 balls, i.e., after each enter key press..
if a press a 'W' key from keyboard it should display a wide ball..
and after the wide ball, the over should continue with the count of a new ball for the wide...
after the over has been done, it should display over complete & start a fresh over..
the over limit is up to the user..

please help me...

shameer ali shaik


Responses

Posted by: Gemamgall on: 6/27/2012 [Member] Starter | Points: 25

Up
0
Down
As you need to input data after eve iteration , you can use console.readline


Let me know if you require syntax

Thanks and Regards,

Vinay Gandhi
www.quadtechindia.com

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Btrack124 on: 6/28/2012 [Member] Starter | Points: 25

Up
0
Down
Take a common Variable to increment the ball count.
on click of 'W' from the KeyBoard increment the value with one

Thanks
http://www.alacraft.com.au/

Roland Masten

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Superb1986 on: 7/1/2012 [Member] Starter | Points: 25

Up
0
Down
Better you can use the static variable within your class and increment when the key is pressed

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shameer.Ali87 on: 7/24/2012 [Member] Starter | Points: 25

Up
0
Down
please get me the syntax for that..

shameer ali shaik

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response