Comp242-hw3leb - #include u using namespace std;...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; u #include <iomanip> using namespace std; u #include <cstdlib> # void fillArray(int ar[], int size, int inc);//This function has three parameters: an int array 'ar', its size 'size' and the increment value 'inc' void printArray(int* ar, int size);//This function prints the elements in the array pointed by 'ar' to the terminal. void mergeArrays(int a1[], int size1, int a2[], int size2, int a3[]);//merges a2 and a1 void shuffle(int* ar, int size);//shuffles" the elements in the array pointed by 'ar' (and whose length is 'size'). int indexOfMinimum(int ar[], int size);//This function returns the index of the minimum element in the array. void sortArray(int* ar, int size,bool (*compare) (int a, int b));//sorts the elements in the array pointed by 'ar' bool ascending(int,int); bool descending(int,int); b int ar1[5]; int ar2[4]; int ar3[9]; i int *p1;//pointer 1 int *p2;//pointer 2 int *p3;//pointer 3 i int value1;//first value from to user to ar1 int value2;//second value from user to ar2 i int inc1;//increment by user ar1 int inc2;//increment by user ar2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2010 for the course COMPUTER E Comp242 taught by Professor I.oyman during the Spring '10 term at Koç University.

Page1 / 4

Comp242-hw3leb - #include u using namespace std;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online