Online C++ Compiler

#include <bits/stdc++.h> using namespace std; long long possible_rhombus(int height, int width) { long long count = 0; for (int i = 2; i <= height; i += 2) { for (int j = 2; j <= width; j += 2) { int temp_1 = height - i + 1; int temp_2 = width - j + 1; count += temp_1 * temp_2; } } return count; } int main() { int height = 4, width = 4; cout<<"Count of number of rhombi possible inside a rectangle of given size are: "<<possible_rhombus(height, width); return 0; }