Ask Question
8 June, 22:13

Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. (2 pts)

Ex:Enter weight 1:236.0Enter weight 2:89.5Enter weight 3:142.0Enter weight 4:166.3Enter weight 5:93.0You entered: 236.000000 89.500000 142.000000 166.300000 93.000000

+4
Answers (1)
  1. 9 June, 00:28
    0
    See below in the explanation section the Matlab script to solve the problem.

    Explanation:

    prompt='enter the first weight w1: ';

    w1=input (prompt);

    wd1=double (w1);

    prompt='enter the second weight w2: ';

    w2=input (prompt);

    wd2=double (w2);

    prompt='enter the third weight w3: ';

    w3=input (prompt);

    wd3=double (w3);

    prompt='enter the fourth weight w4: ';

    w4=input (prompt);

    wd4=double (w4);

    prompt='enter the first weight w5: ';

    w5=input (prompt);

    wd5=double (w5);

    x=[wd1 wd2 wd3 wd4 wd5]

    format short
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on ...” in 📘 Engineering 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