//Cristian Ronzoni 3Ain
//Matrice con 10% di probabilità di riempimento
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#define LUN 8
using namespace std;


void stampa(int arr[LUN] [LUN] , size_t size){
	for(size_t i = 0; i<size; ++i){
		for(size_t j = 0; j<size; ++j){
			cout << setw(3) << arr[i] [j];
		}
		cout << endl;
	 

	}
}

void riempi(int arr[LUN] [LUN], size_t size){	
	for(size_t i = 0; i<size; ++i){
		for(size_t j = 0; j<size; ++j){
			int a = rand() % 10;
			if(a==1)
				arr[i] [j] = a;
			else
				arr[i] [j] = 0;	
		}	
	}
}
int main(void){
	
	srand(time(NULL));
	int arr[LUN] [LUN];
	
	riempi(arr, LUN);
	stampa(arr, LUN);
	
	
}
