Maximum number of tiles required to cover the floor of given size using 2 x1 size tiles | C ++ 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
#include <bits/stdc++.h> NEW_LINE using namespace std ; void maximumTiles ( int n , int m ) { cout << ( m * n ) / 2 << endl ; } int main ( ) { int M = 3 ; int N = 4 ; maximumTiles ( N , M ) ; return 0 ; }