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

RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve

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