#include <iostream>
// Calculates total combinations for:
// choosing 1 option out of 'choicesPerRow'
// across 'rows' rows.
long long calculateCombinations(int choicesPerRow, int rows)
{
long long total = 1;
// Multiply choicesPerRow for each row
for (int i = 0; i < rows; ++i) {
total *= choicesPerRow;
}
return total;
}
int main()
{
const int choicesPerRow = 3;
const int rows = 16;
long long totalCombinations =
calculateCombinations(choicesPerRow, rows);
std::cout << "Total lottery combinations: "
<< totalCombinations << std::endl;
}
/*
run:
Total lottery combinations: 43046721
*/