answersLogoWhite

0

The pseudo code would be as follows (you figure out the syntax)

1) Prompt the user to enter a number

2) If entered number is alpha, quit program after displaying message that the user ended the program.

3) Otherwise, find Modulo 2 of the entered number. This is a fancy way of saying "find the remainder when the number is divided by 2)

4) If Modulo 2 is zero, the number is even, otherwise odd

5) Display message showing if the entered number was Even or Odd

6) Branch back to step 1

User Avatar

Wiki User

11y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: Write a shell program to find given no is even or odd?
Write your answer...
Submit
Still have questions?
magnify glass
imp