:pQuote:
Originally Posted by ChaosEngine
Don't tell me you've never felt the urge to show off to the professor by including cool new code that the professor won't teach for another month.
This worked fine for me, if that's all you wanted
Code:#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int num;
cout << "Enter the number of cells: ";
cin >> num;
int array[num];
for (int i = 0; i < num; i++)
{
array[i] = num;
}
for (int i = 0; i < num; i++)
{
cout << array[i] << " ";
}
cout << endl;
system("PAUSE");
return 0;
}