How do i run this code
How do i run this code
#include <iostream> using namespace std; int main() { int cust 1; int cust 2; int cust 3; int array [8][8][8]; //Declares an array like chess board for( cust 1 = 8, cust 1 < 8 , cust 1++){ for(cust 2 = 8, cust 2 < 8, cust 2++) for(cust 3 = 8, cust 3 < 8 , cust 3++) array [cust 1][cust 2[cust 3]= [cust 1]*[cust 2]*[cust 3]; // set each element to a value cout array<< Array indices:\n"; for (cust 1 =8, cust 1 < 8, cut 1++){ for (cust 2 = 8, cust 2 < 8 , cust 2++) for (cust 3 = 8, cust 3 < 8 , cust 3++) cout<<"["<<cust 1<<"]["<<cust 2<<"]["cust 3<<"] = "<< cout array[cust 1][cust 2][cust 3]<<" "; cout<<"\n"; cin.get() }
7 Jul 13, 11:32PM
Simply compile using gcc, i.e.
gcc test.cpp -o testand then run
./test