Given a number n, check if it is divisible by 8.
The first line of the input contains an integer T denoting the number of test cases. For each test case, there is an integer n whose divisibility we need to check.
For each test case, the output is 1 if the number is divisible by 8 else -1.
1 <= T <= 100
1 <= digits in n < 1000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.