Ask Question
21 July, 13:46

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.

+2
Answers (1)
  1. 21 July, 14:08
    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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers