Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int* reverseArray(int* a, int size);
- int median(int* a, int size);
- void outputArray(int* a, int size);
- int main(){
- int a[] = {0,0,1,2,3,4,5,6,7,8,9};
- int s = sizeof(a)/sizeof(int);
- int* b;
- b = reverseArray(a, s);
- outputArray(a, s);
- outputArray(b, s);
- return 1;
- }
- void outputArray(int* a, int size){
- for (int i = 0; i < size; i++)
- cout << a[i] << " ";
- cout << endl;
- }
- int* reverseArray(int* a, int size){
- int b[size];
- int t = 0;
- for (int i = size - 1; i >= 0; i--){
- b[t] = a[i];
- cout << b[t] << endl;
- t++;
- }
- return b;
- }
- int median(int* a, int size){
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement