• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

while loop take 3 conditions?

Can a while loop take three conditions?
while(a>b && e<f && g!=h) {

Would like to search a file for 3 conditions.
0
yunikon
Asked:
yunikon
2 Solutions
 
hongjunCommented:
yes you can
0
 
DeanHorakCommented:
>> Can a while loop take three conditions?

Technically it can take only one conditional expression.

Your expression "a>b && e<f && g!=h" is a single conditional expression. The expression can be as elaborate as you need, but it all should resolve down to a boolean "true" or "false" value.
0
 
yunikonAuthor Commented:
Thanks as lot
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now