Question: JAVA imagine that we have a width by height grind, where the tiles are numbered starting at 1 in the top left corner. Return the

JAVA
imagine that we have a width by height grind, where
the tiles are numbered starting at 1 in the top left corner.
Return the row number of any tile passed into your program, withs rows
Starting at row 1.
Hint: use integer division, which returns only a whole number
and truncates any remainder. (For example, 7 / 5 returns 1,
because 5 fits into 7 one time).
/* Problem 4: ** /* Imagine that we have a width by height grid, where the tiles are numbered starting at 1 in the top left corner. Return the row number of any tile passed into your program, withs rows starting at row 1. Hint: use integer division, which returns only a whole number and truncates any remainder. (For example, 7 / 5 returns 1, because 5 fits into 7 one time). */ public static boolean test4 = false; public static int main(int width, int height, int tile) { // write the code below, and return the correct result return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
