Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
while (x != 1-5)
// What would I use to make it check if it is between the integers 1 and 5?
Posted
Updated 26-Aug-15 16:38pm
v2

1 solution

C#
while ( ( i >= 1 ) && ( i <= 5 ) ) { 
 // i is between 1 and 5 including.
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900