Ask Question
25 March, 06:01

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. 25 March, 07:07
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers