how to write an algorithm for checking if a number is divisible by two
Answers
Answered by
17
Answer:
Step 2: Read the number by the user in variable "x". Step 3:Test the condition if n mod(%) 2 equals 0 then move to Step 4 . otherwise Move to Step 5. Step 4: Display " Number is divisible by 2 ".
Answered by
2
Answer:
- Start.
- Input n, 2.
- Calculate if (n%2==0) then is divisible else not divisible.
- Output number is divisible or not.
- Stop.
Similar questions