1.int fun(int score[],int m,int below[])
{int i,k=0,aver=0;
for(i-0;i<m;i++)
aver+=score[i];
aver/=m;
for(i=0,i<m;i++)
if(score[i]<aver)
{below[k]=score[i];
k++;}
return k;}
2.void fun(int *a,int *n)
{int i,j=0;
for(i=2;i<1000;i++)
if((i%7==0//i%11==
a[j++]=i;
*n=j;}
3. void fun(int x, int pp[],int *n)
{int i=1,j=0,k=0,*t=pp;
for(i=0;i<=x;i++)
if(i%2!=0)
{t[j]=i;
j++;}
for(i=0;i<j;i++)
if(x%t[i]==0)
{pp[k]=t[i];
k++;}
*n=k;}
4. void fun(char *tt,int pp[])
{int i;
for(i=0;i<26;i++)
pp[i]=0;
while (*tt)
{switch(*tt)
{case'a':pp[0]++;break;
case'b':pp[1]++;break;
case'c':pp[2]++;break;
case'd':pp[3]++;break;
case'e':pp[4]++;break;
case'f':pp[5]++;break;
case'g':pp[6]++;break;
case'h':pp[7]++;break;
case'i':pp[8]++;break;
case'j':pp[9]++;break;
case'k':pp[10]++;break;
case'l':pp[11]++;break;
case'm':pp[12]++;break;
case'n':pp[13]++;break;
case'o':pp[14]++;break;
case'p':pp[15]++;break;
case'q':pp[16]++;break;
case'r':pp[17]++;break;
case's':pp[18]++;break;
case't':pp[19]++;break;
case'u':pp[20]++;break;
case'v':pp[21]++;break;
case'w':pp[22]++;break;
case'x':pp[23]++;break;
case'y':pp[24]++;break;
case'z':pp[25]++;break;}
tt++;}
}
5. void fun(int m,int k,int xx[])
{int g=0,i,j,flag=1;
for(i=m+1;i<m*m;i++)
{for(j=2;j<i;j++)
{if (i%j!=0)
flag=1;
else
{flag=0;
break;}
}
if (flag==1&j>=i)
{if (k>0)
{xx[g++]=i;
k--;}
else
break;}}}
6. void fun(char a[],char b[],int n)
{int i,j=0;
for (i=0;i<LEN;i++)
if(i!=n)
{b[j]=a[i];
j++;}
b[j]=' ';}
7. void fun(int *s,int t,int*k)
{int i,max;
max=s[0];
for (i=0;i<t;i++)
if (s[i]>max)
{max=s[i];
*k=i; }}
8. float fun(int n)
{int i;
float s=1.0,t=1.0;
for (i=2;i<=n;i++)
{t=t+i;
s=s+1/t;}
return s;}
9. p=m!/n!(m-n)!
float fun(int m,int n)
{float p,t=1.0;
int i;
for (i=1;i<=m;i++)
t=t*i;
p=t;
for (t=1.0,i=1;i<=n;i++)
t=t*i;
p=p/t;
for(t=1.0,i=1;i<m-n;i++)
t=t*i;
p=p/t;
return p;}
10. folat fun()
{float x1=0.0,x0;
do
{x0=x1;
x1=cos(x0); }
while (fabs(x0-x1)>=1e-6);
return x1;}
11. int fun(int a[][N])
{int i,j;
for(i=0;i<N;i++)
for(j=0;j<i;j++)
a[i][j]=0;}
12.double fun (int w[][N])
{int i,j,k=0;
double s=0.0;
for (j=0;j<N;j++)
{s+=w[0][j];
k++;}
for (j=0;j<N;j++)
{s+=w[N-1][j];
k++;}
for (i=1;i<=N-2;i++)
{s+=w[i][0];
k++;}
return s/=k;}
13. void fun(int tt[M][N],int pp[N])
{int i,j,min;
for (j=0;j<N;j++)
{min=tt[0][j];
for (i=0;i<M;i++)
{if (tt[i][j]<min)
min=tt[i][j];}
pp[j]=min;}}
14. int fun (int a[M][N])
{int i,j,s=0;
for (j=0;j<N;j++)
{s+=a[0][j];
s+=a[M-1][j];}
for (i=1;i<=M-2;i++)
{s+=a[i][0];
s+=a[i][N-1];}
return s;}
15. unsigned fun(unsigned w)
{unsigned t,s=0,s1=1,p=0;
t=w;
while(t>10)
{if(t/10)
p=t%10;
s=s+p*s1;
s1=s1*10;
t=t/10; }
return s;}
16. float fun (float h)
{long t;
float s;
h=h*1000;
t=(h+5)/10;
s=(float)t/100.0;
return s;}
17. void fun(char *s)
{char ch;
int i,m,n;
i=0;
m=n=strlen(s)-1;
while(i<(n+1)/2)
{ch=s[i];
s[i]=s[m];
s[m]=ch;
i++;
m--;}}
18. void fun(int array[3][3])
{int i,j,temp;
for (i=0;i<3;i++)
{temp=array[i][j];
array[i][j]=array[j][i];
array[j][i]=temp; }}
19. void fun(char s[],int c)
{int i=0;
char*p;
p=s;
while(*p)
{if(*p!=c)
{s[i]=*p;
i++;}
p++;}
s[i]=' ';}
20. int fun(int lim,int aa[MAX])
{int k=0,i,j;
for(i=lim;i>1;i--)
{for(j=2;j<i;j++)
if(i%j==0)
break;
else
continue;
if(j>=i)
{aa[k]=i;
k++;}}
return k++;}
21.void fun(char *s,int num)
{char t;
int i,j;
for (i=1;i<num-2;i++)
for (j=i+1;j<num-1;j++)
if(s[i]<s[j])
{t=s[i];
s[i]=s[j];
s[j]=t;}}
22. double fun (STREC *h)
{ double max;
STREC *q=h;
max=h->s;
do
{if(q->s>max)
max=q->s;
q=q->next; }
while(q!=0);
return max;}
23. int fun(char *str)
{int i,n=0,fg=1;
char *p=str;
while (*p)
{n++;
p++;}
for (i=0;i<n/2;i++)
if (str[i]==str[n-1-i]);
else
{fg=0;
break;}
return fg;}
24. long fun(char *p)
{long s=0,t;
int i=0,j,in=strlen(p),k,s1;
if(p[0]=='-')
i++;
for(j=i;j<=n-1;j++)
{t=p[j]-'0';
s1=10;
for (k=j;k<n-1;k++)
t*=s1;
s+=t; }
if(p[0]=='-')
return -s;
else
return s;}
25. char *fun(char *s,char *t)
{char *p,*t1=t,*s1=s;
int n=0,m=0;
while(*s1)
{n++;
s1++;}
while(*t1)
{m++;
t1++;}
if(n>=m)
p=s;
else