/* This program calculates the sume of the squares
of entered data */
#include <iostream>
usingnamespace std;
int main()
{
int size;
cout << "enter size of data array: ";
cin >> size;
double data[size]; //declare array of data
double dat;
//fill data array
for(int i = 0; i < size; i++){
cout << "enter data: ";
cin >> dat;
data[i] = dat;}
//output the new data array
cout << "data array: " << data[size] <<'\n';
system("pause");
return 0;
}
I want to see an array filled with the numbers I enter, but I just get something like 1.8808ff08 as an output.