answersLogoWhite

0

yes

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you choose multiple if statement and switch statement?

If you must evaluate two or more expressions separately, use multiple if statements. If you only need to test all the possible evaluations of a single expression, use a switch.


What is the similarity between 'if' statement ans 'switch' statement?

A Switch statement can be considered as a series of if. else if. else statements. whatever condition is satisfied, the code block would get executed. if (cond 1) { } else if (cond 2) { } else if (cond 3) { } ...... } else if (cond N) { } else { } switch { case 1: .... case 2: .... .... case N: ... default: ... } Difference: In the if else blocks, if one condition is satisfied, all other blocks are ignored In Switch blocks, unless you have break statements inside each condition block, the subsequent blocks would not be ignored.


How do you change if else statment to case statment?

It's not always possible. If the expression in each if statement can be reduced to a single expression with multiple evaluations, then you can use a switch case to cater for each evaluation. If you must use separate expressions to obtain the evaluations, then you must use if, else if, else.


What statement is use to make a decisions?

None of them; you may think of the conditional statements, like if-else, for, while, do-while.


Structure of If-Then statement?

if (condition) statement1 [else statement2] example: if (i==j); else if (j==k) printf ("i!=j, j==k\n); else printf ("i!=j, j!=k\n); here statement1 is an empty-statement, statement2 is another if-statement There are three forms of statements IF-THEN IF-THEN-ELSE IF-THEN-ELSIF Sequence of statements is executed only if the condition evaluates to TRUE If condition evaluates to FALSE or NULL, it does nothing In either case control passes to next statement after the IF-THEN structure IF THEN statements; END IF; Sequence of statements in the ELSE clause is executed only if the condition evaluates to FALSE or NULL IF THEN statements; ELSE statements; END IF;


How to make decision making statements in c plus plus?

Decision making statements make use of conditional expressions. In C++ there are three possibilities: if/else, switch/case and the ternary operator (?:).


How do you group multiple PHP statements that are controlled by a single if-then statement?

To group multiple PHP statements that are controlled by a single if-then statement, you can use curly braces {} to define a code block. This allows you to enclose all the statements you want to execute if the condition is true. For example: if ($condition) { // Statement 1 // Statement 2 // Statement 3 } By using curly braces, all enclosed statements will run together when the condition is met.


How are multiple decisions different from nested decisions?

In order to achieve multiple decisions in a program, you have to join multiple IF statements and use the AND logic to determine if they are true of false, whereas in a nested decision, only one statement must be true in order for it to move forward or End. If (applicant >= 21) AND (applicant <= 19) then add 1 to hireList Else add 0 to hireList End if IF condition1 THEN IF condition2 THEN ASP Statement(s) for when condition2 is met ELSE ASP Statement(s) when this condition2 is NOT met END IF END IF


What are statements that use the words "always" and "never" called?

Statements that use the words "always" and "never" are called absolute statements.


What structure allows you to test the value of a variable or an expression and then use that to determine which statement or set of statements to execute?

multiple alternative decision structure / case structure


How to write an if then statement?

It depends on the language however most use the following syntax: if (expression) then statement else statement endif Note that the "then" and "endif" keywords are not used in all languages since they are implied by the statement's structure and are normally only found in verbose languages such as BASIC. In C and C++, for instance, we have the following form: if (expression) { statement; } else { statement; } The expression must be a boolean expression; one that evaluates true or false. If the expression evaluates to a number, the expression evaluates true when the number is non-zero, otherwise it is false. When the expression is true, the first statement is executed otherwise the second statement is executed. Often we do not wish to execute anything when an expression is false, only when it is true, so the else clause is optional. if (expression) statement; In languages that use braces {} to denote structure, they are usually optional for simple statements but mandatory for compound statements. A compound statement is a group of statements that are treated as being one statement. Either statement may itself be an if statement (a nested if): if (expression) { if (expression) { statement; } else { statement; } } else { statement; } Spreading if statements over multiple lines and using whitespace indentation helps to highlight the logic and structure of the statement. It is not possible to show whitespace indentation here, but here's the same example using periods instead of whitespace: if (expression) { ...if (expression) { ......statement; ...} else { ......statement; ...} } else { ...statement; } Note the use of blank lines to separate the inner (nested) if from the outer if.


Is it possible to iterate multiple items over a iterator?

No. An iterator can be used to iterate through only one collection. to iterate through multiple collections you must use multiple iterators.