Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
508 B
4
Indexable
Never
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{

	srand(time(NULL));

	int tab[10][10];

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			int minus = rand() % 2;
			int numer = 10 + rand() % 90;
			
			if (minus == 1)
			{
				numer = -numer;
			}

			tab[i][j]=numer;
			

		}
	}
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{

			cout << tab[i][j] << " ";

		}
		cout << endl;
	}

}
Leave a Comment