Geography, asked by gurleenkaur85, 9 months ago

plz answer all the questions plz ​

Attachments:

Answers

Answered by Rishikarai7
0

Answer:

1. Java supports 5 types of control structures to control the flow of a program.

*Sequential Control Structure

* Conditional Control Structure

* Repetition Control Structure

* Selection Control Structure

* Jump Control Structure

--------------------------------------------------------------

2.*  We can also call these statements as decision making control structure.

* They let us make a decision based upon the result of a condition.

* These statements will execute a block of code conditionally depending on whether the condition is true or false.

* If the condition is true, then the block of code will execute otherwise it will be skipped.

* In some cases, there are 2 statement blocks one for the true value and other for the false value.

* Moreover, the control will not go to the next statement until and unless the condition is satisfied.

For example,

if

if..else

if..else ladder (multiple if)                                                                                                                                   nested if                                                                                                                                                                                                                                               ------------------------------------------------------------------------                                                                                                                                                                                                                                                                                    3. The versatility of the computer lies in its ability to perform a set of instructions repeatedly. This involves repeating some portion of the program either a specified number of times  until particular condition is being satisfied. there are methods by way of which we can repeat a part of program.

TYPES OF LOOP

1- using a for statement

2- using a while statement

3- using a do while statement                                                                                                                                                                                                                                --------------------------------------------------------------------------------------                                                                                                                                                                                                                                                                          4.  

Entry Controlled Loop  and Exit Controlled Loop

* Test condition is checked first, and then loop body will be executed.          *  Loop body will be executed first, and then condition is checked.

* If Test condition is false, loop body will not be executed. If Test condition is false, loop body will be executed once.

* for loop and while loop are the examples of Entry Controlled Loop. do while loop is the example of Exit controlled loop.

* Entry Controlled Loops are used when checking of test condition is mandatory before executing loop body. Exit Controlled Loop is used when checking of test condition is mandatory after executing the loop body.

Similar questions