I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Programming » C/C++ »

How do i run this code

KOFFI\′s Photo
5 Jul 13, 8:39PM
(1 reply)
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()
        }
CodeCogs\′s Photo
7 Jul 13, 11:32PM
Simply compile using gcc, i.e.
gcc test.cpp -o test
and then run
./test
Currently you need to be logged in to leave a message.