Maximum number of tiles required to cover the floor of given size using 2 x1 size tiles | Java program for the above approach ; Function to find the maximum number of tiles required to cover the floor of size m x n using 2 x 1 size tiles ; Print the answer ; Driver code ; Given M and N ; Function call
import java . util . * ; class GFG { static void maximumTiles ( int n , int m ) { System . out . println ( ( m * n ) / 2 ) ; } public static void main ( String [ ] args ) { int M = 3 ; int N = 4 ; maximumTiles ( N , M ) ; } }