#include "func.h" void find(int type, int size, int *massive){ int x,k,m,sum; switch(type){ case 6: case 8: for (int i = size - 1; i>=0;i--) if(massive[i]>0){ printf("last positive int: "); printf("[%3d]\t{%p}\t%d\n",i,&massive[i],massive[i]); break; } printf("positive int is not found.\n"); break; case 7: case 9: for (int i = size; i>=0;i--) if(massive[i]<0){ printf("last negative int: "); printf("[%3d]{%p}\t%d\n",i,&massive[i],massive[i]); break; } printf("negative int is not found.\n"); break; case 14: x=k=0; printf("find all modules of k\nInput: "); while(scanf(" %d",&k)!=1||k>size-1){ if(k>size-1)printf("k shood be lower than %d",size); if(flush())return; } if(flush())return; for(int i = 0; imassive[i]){ if(type != 21) printf("[%3d]{%p}\t%d\n",i,&massive[i],massive[i]); x++; sum+=massive[i]; } } if(type == 21)printf("summ - %d\n",sum); break; case 25: case 27: case 29: sum=0; printf("find all int higher lower mean\nInput: "); for(int i = 0; imassive[i]){ if(type != 21) printf("[%3d]{%p}\t%d\n",i,&massive[i],massive[i]); x++; sum+=massive[i]; } } if(type == 29)printf("summ - %d\n",sum); break; case 26: case 28: case 30: sum=0; printf("find all int higher lower mean\nInput: "); for(int i = 0; i