Answer the question
In order to leave comments, you need to log in
A function that returns an array. How to display all elements of an array?
typedef size_t sz;
int* array(sz n)
{
int *arr = new int[n];
for (sz i = 0; i < n; i++)
{
cin >> arr[n];
}
return arr;
}
int main()
{
setlocale(LC_ALL, "Russian");
array(7);
getch();
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question