Computer Science, asked by akshu48761, 1 day ago

design and algarithm and flowchart to find the given odd or even
what is the answer

Answers

Answered by ayushbhardwaj0161
0

Answer:

The first step in the algorithm is taking a number as an input from User. Let's say user enters value 6. So 6 will be stored inside variable "number".

Now the next step in algorithm (i.e number%2==0), in this step (number%2) returns the remainder after dividing number by 2.

[Note: Here % is known as modulus, which is an operator that returns remainder value after division]

Now the next step (i.e. remainder==0) simply checks if the remainder value is equal to 0 or not.

So if the remainder is 0, then the number is said to be Even number else it is said to be an Odd Number.

If the User Inputs 6, then

number=6

Remainder=number%2

i.e Remainder=6%2

Remainder=0

As Remainder is 0, 6 is an Even Number

Answered by ctanishq474
0

even is correct answer. because odd and odd =even

Similar questions