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:=xyS:=x\cdot y

output: S \\ area of a rectangular


2)

input: x1,x2,x3,x4,x5x_1, x_2,x_3,x_4,x_5 \\ 5 numbers

m=x1+x2+x3+x4+x55m=\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==0x\%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!
LATEST TUTORIALS
APPROVED BY CLIENTS