-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6.15.cpp
More file actions
33 lines (28 loc) · 709 Bytes
/
6.15.cpp
File metadata and controls
33 lines (28 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "tasks.h"
void main_615() {
double* array = nullptr;
int a;
size_t N = 1000;
array = (double*)malloc(N * sizeof(double)); //Âûäåëåíèå ïàìÿòè ïîä 1000 ýëåìåíòîâ òèïà double
if (array == NULL) {
cout << "Îøèáêà âûäåëåíèÿ ïàìÿòè";
return;
}
size_t size = 0;
size_t ind;
size_t rows;
size_t columns;
cout << "Ââåäèòå êîëè÷åñòâî ñðîê ìàññèâà: ";
cin >> rows;
cout << "Ââåäèòå êîëè÷åñòâî ñòîëáöîâ: ";
cin >> columns;
for (int i = 1; i <= rows*columns; i++) {
cin >> a;
push_back(array, size, N, a);
}
print(array, size, columns);
add_row(array, size, columns, rows, N);
print(array, size, columns);
add_column(array, size, columns, rows, N);
print(array, size, columns);
}