Ответ:
#include <iostream>
#include <time.h>
#include <iomanip>
using namespace std;
int main()
{
int a[10][10];
int i, j, n;
setlocale(LC_ALL, "Russian");
srand(time(NULL));
n = 1;
for (i = 0; i < 10; i++) {
cout << "\n";
for (j = 0; j < 10; j++) {
n += (double)rand() / (RAND_MAX + 1) * 5;
a[i][j] = n;
cout << setw(5) << a[i][j] << " ";
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
#include <iostream>
#include <time.h>
#include <iomanip>
using namespace std;
int main()
{
int a[10][10];
int i, j, n;
setlocale(LC_ALL, "Russian");
srand(time(NULL));
n = 1;
for (i = 0; i < 10; i++) {
cout << "\n";
for (j = 0; j < 10; j++) {
n += (double)rand() / (RAND_MAX + 1) * 5;
a[i][j] = n;
cout << setw(5) << a[i][j] << " ";
}
}
}