Close
Close

Write a program that takes two integer values as input (therefore declare two integer variables). Get input in those variables using scanf function. F

   shahhussain

 Write a program that takes two integer values as input (therefore declare two integer variables). Get input in those variables using scanf function. Finally using if (condition) else if (condition) else statement check if the value is greater than 0 and less than 10, secondly if value is greater than 10 and less than 50 and finally printing that the value is greater than even 50.
Use the logical connectives: >, <, >=, <= and !=

---
1. Condition is checked first then statement(s) is executed.
2. It might occur statement(s) is executed zero times, If condition is false.
3. No semicolon at the end of while. i.e. while(condition){ body }
4. If there is a single statement, brackets are not required.
5. Variable in condition is initialized before the execution of loop.
6. while loop is entry controlled loop. while(condition){ statement(s); }

-------

1. Statement(s) is executed atleast once, thereafter condition is checked.
2. At least once the statement(s) is executed.
3. Semicolon at the end of while. do { statement; } while(condition);
4. Brackets are always required.
5. Variable may be initialized before or within the loop.
6. do-while loop is exit controlled loop. do { statement(s); } while(condition);

-------


Answers

Ask Yours
Post Yours
Write your answer