Rearrange the algorithm to obtain and display a name, in correct
order:
1.
INPUT name
2.
DECLARE names[20]
3.
PRINT name
Answers
Explanation:
DECLARE names[20]
INPUT names
PRINT names
Answer:
The correct order for the algorithm to run is found to be:
2. DECLARE names[20]
1. INPUT name
3. PRINT name
Explanation:
Algorithm:
Algorithms can be defined as a set of rules or a set of steps that must be developed to provide a solution to a logical or mathematical problem.
Technically, computers expect very detailed instructions from algorithms to perform operations or solve problems. Here, each algorithm starts by declaring the main variables: name and address. The value of the variable can be retrieved by the user. Then the final output needs to be displayed.
Algorithms to obtain and display a name:
Step 1: Start
Step 2: Declare the name and address of your variable.
Step 3: Read the name and address values from the user.
Step 4: Show the name.
Step 5: Finish
#SPJ3