Computer Science, asked by yuvraj908, 2 months ago



Write an algorithm to find whether a given number is odd or even.​

Answers

Answered by Adoncia
2

Answer:

START Step 1 → Take integer variable A Step 2 → Assign value to the variable Step 3 → Perform A modulo 2 and check result if output is 0 Step 4 → If true print A is even Step 5 → If false print A is odd STOP.

Answered by thebrain2312
0

Answer:

Finding that a given number is even or odd, is a classic C program. We shall learn the use of conditional statement if-else in C.

Algorithm

Algorithm of this program is very easy −

START

Step 1 → Take integer variable A

Step 2 → Assign value to the variable

Step 3 → Perform A modulo 2 and check result if output is 0

Step 4 → If true print A is even

Step 5 → If false print A is odd

Similar questions