Answer:
The algorithm to find A is even or odd.
Explanation:
To check if the number is even or odd we use modulo operator(%).Which gives the remainder on dividing.So if we do this A%2 it will give the remainder that will come out on dividing the value of A by 2.
So if the remainder comes out is 1 then the number is odd and if the remainder is 0 then the number is odd.