i am hving trouble with this program.plz correct it

initilze (N*N) matrix with random number in the range 1-9



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<iostream>
#include<conio.h>
#include <stdlib.h>
#include <time.h>
const int n=9;
using namespace std;
void initilization (int arr[][5],int n)
{
	for (int i=0;i<n;i++){
	for(int j=0;j<n;j++)
	
	arr[i][j] = (rand()%9) + 1;
	{
	cout<<arr[i]<<" ";}
cout<<endl;
	}}
int main(){
	int arr[i][n];
	cout<<"the random no are"<<endl;
	initilization(arr,n);
	getch();

	
}
Topic archived. No new replies allowed.