67.7k views
8 votes
Write an algorithm to show whether a given number is even or odd.

User BlueSpud
by
5.7k points

1 Answer

3 votes
Answer:
Step 1: Start
Step 2: Take any number and store it in n
Step 3: if n=multiple of 2 print "even" else print "odd"
Step 4: Stop
Step-by-step explanation:
If the number is dividable or a multiple of 2, the number is even. If it's not the number is odd
User Jackey
by
5.8k points