Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int N = 10;
- typedef int A[N];
- void func(int arr[], int n);
- int main() {
- int n;
- const int r = 10;
- int A[r];
- cout << "Elements: |";
- for (int r = 0; r < N; r++)
- {
- A[r] = rand() % 10;
- cout << A[r] << "|";
- }
- n = N;
- func(A, n);
- return 0;
- }
- void func(int arr[], int n)
- {
- n = N;
- for (int i = 11 - 1; i >= 0; i--)
- {
- cout << arr[i] << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement