Algorithm:
Step 1: Start
Step 2: Read the integer value from the keyboard
Step 3: Check if the number is odd or even
Step 4: If the number is odd, display "The number is odd"
Step 5: If the number is even, display "The number is even"
Step 6: Stop
Pseudocode:
1. Start
2. Read integer from keyboard
3. If integer is odd
a. Display "The number is odd"
4. Else if integer is even
a. Display "The number is even"
5. Stop
Flowchart:
```
Start
|
Read integer from keyboard
|
|--------- Is integer odd? ---------|
| |
Yes No
| |
Display "The number is odd" Display "The number is even"
| |
|------------------------------------|
|
Stop
```
how to write algorithm and pseudocode and how to draw flowchart to read an integer value from the keyboard and display a message indicating if the number is odd or even.
1 answer