Answer to Question #162801 in Algorithms for Kwame Hayford

Question #162801

1)write an algorithm to find the area of a rectangular using pseudocode


2)write an algorithm to find the mean of 5 numbers.


3)write an algorithm to find wether a given number is even or odd


1
Expert's answer
2021-02-11T16:58:28-0500

1)

input: x,y \\width, length of a rectangular

"S:=x\\cdot y"

output: S \\ area of a rectangular


2)

input: "x_1, x_2,x_3,x_4,x_5" \\ 5 numbers

"m=\\frac{x_1+ x_2+x_3+x_4+x_5}{5}"

output: m \\ the mean of 5 numbers


3)

input: x \\ number

if ("x\\%2==0" ) \\ check whether a given number is divisible by 2

then otput: x is even

else output: x is odd


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS