Online C++ Compiler

#include <bits/stdc++.h> using namespace std; int MaxPieces(int N) { //H is the number of horizontal cuts int H = N / 2; //V is the number of vertical cuts int V = N-H; // maximum number of pieces = (H+1)*(V+1) return ((H + 1) * (V + 1)); } //Main function int main() { //Number of cuts int N = 7; cout << "Max pieces = "<<MaxPieces(N); return 0; }