Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
how to write algorithm and pseudocode and how to draw flowchart to read an integer value from the key board and display a messa...Asked by adugnaw
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.
Answers
There are no human answers yet.
Answered by
Bot
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
```
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
```
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.