Asked by Chernor Jalloh
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
Answers
Answered by
oobleck
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
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
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.