while loop take 3 conditions?

Posted on 2006-03-29
Last Modified: 2010-04-01
Can a while loop take three conditions?
while(a>b && e<f && g!=h) {

Would like to search a file for 3 conditions.
Question by:yunikon
    LVL 33

    Assisted Solution

    yes you can
    LVL 11

    Accepted Solution

    >> 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.

    Author Comment

    Thanks as lot

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Article by: SunnyDark
    This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
    This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
    The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now