answersLogoWhite

0

if (i==1) puts ("i==1");

if (i==2) if (j==3) puts ("i==2, j==3);

else puts ("i==2, j!=3");

if (i==2) if (j==3) puts ("i==2, j==3);

else puts ("i==2, j!=3");

else if (j==3) puts ("i!=2, j==3);

else puts ("i!=2, j!=3");

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Examples of Conditional statement?

if-then-else


What is or are the threat?

A threat is an "or else" statement Here are some examples: You better listen to me or else... You better not mess with me or else... You better do well on your test or else.... You better do what I say or else... Do it now or else...


Can you use conditional operator in cout statement?

Yes, but 'cout' is not a statement! Examples for statements: null-statement, block, expression, if-else, while, do-while, for, continue, switch, break, return.


General syntax for if with examples?

if () orif () else examples:if (argc==1); /* null-statement */else if (argc==2)if (strcmp (argv[1], "help") /* nested if */{ puts ("Help"); } /* compound statement */else puts ("No help");else printf ("argc=%d\n", argc);


What is difference between IF THEN and IF THEN ELSE statement?

An if-then statement, or simply an if statement, checks if a stated condition is true. If the condition is true, then a block of code will then execute. Example: if number equals 3 print out "Number equals 3" An if-then-else statement, or simply an if-else statement, checks if a stated condition is true. If the condition is true, then a certain block of code will then execute. If the condition is false, then a different block of code will then execute. Example: if number equals 3 print out "Number equals 3" else print out "Number does not equal 3" For both if statements and if-else statements, there is only one stated condition. The difference between them is that an if statement will only cause something to happen if the condition is true. An if-else statement will execute a block of code whether the condition is true or false.


Syntax of nested if in c?

If(condition) { if-else statement; } else { if-else statement; }


What is the scope of variables declared in an if then else statement is false path?

Only the true path in the If...Then...Else statement


Is it possible to print both if statement and else statement?

Yes int main (void) { puts ("if statement"); puts ("else statement"); return 0; }


How If and else run at a time?

The standard syntax is:if( conditional_expression )statement;[[else if( conditional_expression )statement;[else if...]]else statement;][] denotes optional components. Each statement may be a single statement, or may be multiple statements surrounded by braces {}.The if( conditional expression ) statement; is the only required component. In plain English, this reads: if the conditional expression is true, then execute the following statement, otherwise skip to the line following the statement.If the next line is an else statement, then the line reads: if the conditional expression is true, then execute the statement and skip over the else statement. But if the conditional expression is false, then skip over the statement and execute the else statement instead.if( conditional_expression )statement; // execute when conditional expression is trueelsestatement; // execute when conditional expression is falseThe statement following the else can be another ifstatement (a nested if):if( conditional_expression_1 )statement; // execute when conditional_expression_1 is true.else if( conditional_expression_2)statement; // execute when conditional_expression_1 is false and _2 is true.elsestatement; // execute when both _1 and _2 are both false.Note that if an else statement is used without a following if statement, it must appear after all other else if statements.


What is else if in C programming language?

Statements. Typical usage: if (<condition>) <statement>; else <statement>;


What is ladderized if else if conditional statement?

if(condition) { statements /* ... */ }


What is the kind of proverbs?

1. Opposite parallel 2. Similar parallel 3. Single statement 4. Statement with an explanation 5. Comparison 6. Descriptive list 7. "If…then" statement and "or else" instruction