есть программа на C++ которая что то выводит, как сделать так чтобы это 'что то' сохранялось в ms excel таблицу
#include <stdlib.h>
#include <iostream>
#include <malloc.h>
using namespace std;
int* a;
int i, n, b, c;
int enter() {
system("chcp 1251");
system("cls");
cout << "введите размер массива: ";
cin >> n;
a = (int*)malloc(n * sizeof(int));
for (i = 0; i < n; i++) {
cout << i + 1 << "/" << n << ": ";
cin >> b;
a[i] = b;
}
for (i = 0; i < n; i++) {
cout << a[i] << ' ';
}
cout << endl;
return a, n;
}
int change() {
int min = 0, max = 0;
for (int i = 0; i < n; i++) {
if (a[i] < a[min])
min = i;
if (a[i] > a[max])
max = i;
}
int tmp = a[max];
a[max] = a[min];
a[min] = tmp;
for (int i = 0; i < n; i++) {
cout << a[i] << " ";
}
cout << endl;
free(a);
return tmp;
}
int main() {
enter();
change();
}