背景:我是编程的初学者.这是我迄今为止在生命游戏的草稿中所拥有的:
#include <iostream>
using namespace std;
int main()
{
//INTRODUCTION
int arraySize;
cout << "What is the length of your square-shaped grid? Enter an integer value greater than 0. Too big will cause problems.";
cin >> arraySize;
int original[arraySize][arraySize];
//REQUESTS INPUT FOR ARRAY
for (int n = 0; n < arraySize; n++)
{
for (int x = 0; x < arraySize; x++)
{
bool ValInput;
cout << "\n" << n << "," << x << "...";
cin >> ValInput;
original[n][x] …Run Code Online (Sandbox Code Playgroud) c++ ×1