Random code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main(int nNumberofArgs,char* pszArgs[])
{
    int myarray[5][5][5];
    double n;
    for(;;)
    {
        cin >> n;
        if(cin.fail())
        {
            break;
        }
        for(int i = 0;i < 5;i++)
        {
            for(int i2 = 0;i2 < 5;i2++)
            {
                for(int i3 = 0;i3 < 5;i3++)
                {
                    myarray[i][i2][i3] = i * i2 * i3 * n;
                }
            }
        }

        for(int i4 = 0;i4 < 5;i4++)
        {
            for(int i5 = 0;i5 < 5;i5++)
            {
                for(int i6 = 0;i6 < 5;i6++)
                {
                    cout << myarray[i4][i5][i6] << "\t";
                }
                cout << endl;
            }
            cout << endl;
        }
    }
    return 0;
}


I just want to see what you think of it
What is it supposed to do?
It is probably supposed to make a multiplication 3D table
Topic archived. No new replies allowed.