Ask Question
28 December, 12:38

The following pseudcode algorithm has an error. the programs is supposed to ask the user for the length and width of a rectangular room, and they display the room's area. the program must multiply the width by the legnth to determine the area. Find the error.

area = width x length. display "what is the room's width?". input width. display "what is the room's length?". input length. display area.

+1
Answers (1)
  1. 28 December, 15:46
    0
    The order of the code is wrong

    Step-by-step explanation:

    In programming, you should take into account the order in which you write the lines, because the computer proccesses them in that exact order. So, if you are calculating the area before width and length are given, the computer couldn't know what to do.

    You must change the order:

    "what is the room's width?"

    input width

    "what is the room's length?"

    input length

    area = width x length

    display area
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “The following pseudcode algorithm has an error. the programs is supposed to ask the user for the length and width of a rectangular room, ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers