answersLogoWhite

0


Best Answer

Yes, it works similar to an IF statement using logical operators.

For instance this would work, but if either of the boolean values were false at the end of the loop it would leave the loop.

bool a = true;

bool b = true;

while (a && b)

{

//run code

}

or: while (exp1 exp2) dosomething

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can two expressions or conditioned be used in while statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a case statement used for in Oracle?

The Case Statement in Oracle is a command that evaluates a condition (or a sequence of conditions) for one or multiple expressions. According to the value of those expressions a corresponding statement is executed.


Where you have to put semicolon in c programming?

For clasesses it defines from which class to inherit. :: means area of visibility in certain name space.


What is while statement and how is it used?

You use a while statement to introduce a conditional loop. Unlike a for loop which is typically used for counted loops, a while loop is used whenever a statement must iterate while an expression evaluates true. The expression is evaluated at the start of each iteration.


When can cross multiply be used as a shortcut to the solution while solving rational expressions?

in division


What is used to end a do loop?

A while statement.


What is a conditioned pan?

A conditioned pan is a pan that has been used for cooking at least once.


What are control structures used in javascript?

The control structures used in java script are if-statement, for-loop, for-in loop, while loop,do-while loop, switch-statement, with-statement. try-catch-finally statements.


Why do you use semi colon in do while statement?

A semi-colon is used in a do while statement for the same reason that it is used in any other statement. The rules of C and C++, as well as Java, require that every statement be terminated with a semi-colon.


Can a question be a statement?

No, a question and a statement are two distinct types of sentences. A question is used to inquire about information while a statement is used to express a fact or opinion.


What are expression and statement in c?

All that is interesting in C code is formed from declarations and expressions. A declaration is a statement while an expression becomes a statement when you add a semicolon at the end of the expression. A semicolon by itself is a statement (the empty statement). Basically, anything that can be evaluated (has a value) is an expression. Thus assignments, operations and function calls are all expressions. Unlike an expression, a statement has no value. Statements are used to specify the order of execution, however the compiler is free to re-order statements to improve efficiency provided the re-ordering has no effect on the result. A (possibly empty) group of statements enclosed in braces, { and }, is known as a block or compound statement. A name declared in a block falls from scope at the end of the block.


How many terms are used as expressions?

There is no limit to the number of terms that are used as expressions.


A colon may be used in which of the following situations?

A colon may be used to introduce a list, to separate hours and minutes in time expressions, and to indicate a formal statement or quotation.