Friday, October 28, 2022

2-d Array

#include <iostream>
#include <math.h>
using namespace std;
#define N 9
int main()
{   int a[N][N], b;
    for (int i = 0; i < N; i++)
        for (int j = 0; j < N; j++)
               a[i][j] = rand() % 10;
    for (int i = 0; i < N; i++)
    {
        for (int j = 0; j < N; j++)
            cout << a[i][j] << " ";
        cout << "\n";
    }
 }

No comments:

Post a Comment

NaCl.xyz Generator with Interactive 3D Visualization

NaCl.xyz Generator with Interactive 3D Visualization NaCl.xyz Generator with Interactive 3D Visualization ...