//lin_search /* An array contains numbers - positive and negative as well, but we don't know for sure, if there is any negative at all or not a.) if there is any negative nr., which is the first, at which position and what is it's value?*/ #include #include using namespace std; void read(int data[], int &, int); bool linker(int data[], int, int&, int&); struct lker{ bool l; int ind, value; }; lker lin_search(int data[], int); int main() { const int max_v=30; int h[max_v]; int n; read(h, n, max_v); //with structure: lker result=lin_search(h, n); if(result.l) { cout<<" I found such a nr. and it is at pos.: "<>n; }while( n<1 || n>max_v); cout<<"please, give the values: "; for(int i=0; i>h[i]; cout<<" "; } } lker lin_search(int data[], int n) { lker a; a.l=false; int i=0; while(!a.l && i