Ask questions and get helpful answers.

Draw a pseudo code to represent the logic of a program that allows the user to enter five values. The program prints the modulus(%) of the five values

  1. 👍
  2. 👎
  3. 👁
  4. ℹ️
  5. 🚩
1 answer
  1. If we're talking real numbers, and by modulus you mean the absolute value, then

    for i=1..5
    print "value; "
    read val[i]
    next i
    for i=1..5
    v = val[i]
    print "The modulus of ",val[i]," = ", (v < 0) ? -v : v
    next i

    1. 👍
    2. 👎
    3. ℹ️
    4. 🚩

Answer this Question

Related Questions

Still need help?

You can ask a new question or browse existing questions.