Q. To check if a number is an odd or even number.
Answer :-
Algorithm :-
1. Start
2. Input number
3. If number % 2 == 0
4. Print "number is even"
5. Else
6. Print "number odd"
7. Stop
Pseudocode :-
N = input "A number "
If n is fully divisible by 2
Display " n is even number "
Else
Display " n is positive number "
Flow Chart :-
Click on image for clear view.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )