Online C++ Compiler

//This is C++ implementation of above approach #include <bits/stdc++.h> using namespace std; // function that calculates the maximum no. of cuts int numberOfCuts1(int A, int B) { int result1 = 0; result1 = (A - 1) * (B - 1); return result1; } // Driver Code int main() { int A = 4, B = 4; // Calling function. int Cuts = numberOfCuts1(A, B); cout << "Maximum cuts = " << Cuts; return 0; }