Answer to Question #146240 in Java | JSP | JSF for Glen

Question #146240
Use an example to briefly explain the features of a structured program.
1
Expert's answer
2020-11-23T14:37:03-0500

Structured programming approach is a programming, in which the program is made as a single structure. In this program will execute line by line. It does not support jumping from one instruction to another such as goto statement. Therefore the instruction will be executed in serial and structured manner.

program to print hello 10 times in basic, It is unstructured-

DIM I 
LET I = 0 
PRINT "HELLO" 
LET I = I + 1 
IF I < 10 THEN GOTO 30 END IF 

Here is that program again written structured

DIM I 
FOR I = 0 TO 9 
  PRINT "HELLO" 
NEXT 

Given below examples of structured programming approach-

c

C++

Java

It consists of three types of elements:

  • Selection Statements
  • Sequence Statements
  • Iteration Statements

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS