How accurate are the results of this app?
Code:
#include <iostream>
#include <conio>
using namespace std;
void _In_Out()
{
int sides;
cout << "How many dimensions(2-255) does the hypercube have? ";
cin >> sides;
double area = 1, hypercube[255];
for(short i = 1; i <= sides; i++)
{
if(hypercube[i] == 0) break;
cout << "Enter dimension units(u)" << i << ": ";
cin >> hypercube[i];
area = area * hypercube[i];
}
cout << "\n\n\tThe hypercube has an area of: " << area << "u^" << sides;
}
int main()
{
clrscr();
_In_Out();
return 0;
}
Assuming the user enters 255 values of 9999999u each, would the answer be accurate?