7.010

#include "allinclude.h" //DO NOT edit this line
int min(int x, int y, int z) // 返回x、y、z中的最小值
{ // Add your code here
int min=x;
if(min>y)
{
min=y;
}
if(min>z)
{
min=z;
}
return min;
}
7.020

#include "allinclude.h" //DO NOT edit this line
int change(int n)
{ // Add your code here
int m=0;
int i,j,k;
int x=1,y=5,z=10;
for(i=0;i<=n;i++)
{
for(j=0;j<=n;j++)
{
for(k=0;k<=n;k++)
{
if(i*x+j*y+k*z==n)
{
m++;
}
}
}
}
return m;
}
7.030
#include "allinclude.h" //DO NOT edit this line
int prime(int n) /* 判断素数,如果是素数返回1,不是素数则返回0 */
{ // Add your code here
int j;
for(j=2; j
7.050

#include "allinclude.h" //DO NOT edit this line
void func(char* str)
{ // Add your code here
int i=1,m=0,k;
char x;
for(m=0,i=1;str[i]!='\0';i++)
{
if(str[m]>str[i])
{
m=i;
}
}
k=str[m];
for(i=m-1;i>=0;i--)
{
str[i+1]=str[i];
}
str[0]=k;
}
7.060

#include "allinclude.h" //DO NOT edit this line
void invert(char a[N][N])
{ // Add your code here
int i=0,j=0,t=0;
for(i=0;i
7.064

#include "allinclude.h" //DO NOT edit this line
void invertH(char a[N][N])
{ // Add your code here
int i=0,j=0,t=0;
for(i=0;i
7.065

#include "allinclude.h" //DO NOT edit this line
void invertV(char a[N][N])
{ // Add your code here
int i=0,j=0,t=0;
for(i=0;i
7.067

#include "allinclude.h" //DO NOT edit this line
void turningClockwise(char a[N][N])
{ // Add your code here
int t,j;
t=a[0][0];
for(j=0;j0;j--)
{
a[j][N-1]=a[j-1][N-1];
}
for(j=N-1;j>0;j--)
{
a[0][j]=a[0][j-1];
}
a[0][1]=t;
}
7.068

#include "allinclude.h" //DO NOT edit this line
void turningAnticlockwise(char a[N][N])
{ // Add your code here
int t,j;
t=a[0][0];
for(j=0;j0;j--)
{
a[N-1][j]=a[N-1][j-1];
}
for(j=N-1;j>0;j--)
{
a[j][0]=a[j-1][0];
}
a[1][0]=t;
}
7.072

#include "allinclude.h" //DO NOT edit this line
void turningRight(char a[N][N])
{ // Add your code here
int s[100];
for(int i=0;i=0;k--)
{
a[j][k+1]=a[j][k];
}
}
for(int x=0;x
7.075

#include "allinclude.h" //DO NOT edit this line
void turningLeft(char a[N][N])
{ // Add your code here
int s[100];
for(int i=0;i
7.082

#include "allinclude.h" //DO NOT edit this line
void turningDown(char a[N][N])
{ // Add your code here
int s[100];
for(int i=0;i=0;k--)
{
a[k+1][j]=a[k][j];
}
}
for(int x=0;x
7.085

#include "allinclude.h" //DO NOT edit this line
void turningUp(char a[N][N])
{ // Add your code here
int s[100];
for(int i=0;i
7.103

#include "allinclude.h" //DO NOT edit this line
int gdc(int m, int n)
{ // Add your code here
int r=0;
if(m<0||n<=0)
{
return -1;
}
while((r=m%n)!=0)
{
m=n;
n=r;
}
return n;
}
7.105

#include "allinclude.h" //DO NOT edit this line
int lcm(int m, int n)
{ // Add your code here
int p=1;
for(p=1;;p++)
{
if(m*p%n==0)
{
return m*p;
}
}
}
7.115

#include "allinclude.h" //DO NOT edit this line
int func(int a, int b)
{ // Add your code here
int c=a/10*1000+b/10*100+a%10*10+b%10;
return c;
}
7.125

#include "allinclude.h" //DO NOT edit this line
float func(float r)
{ // Add your code here
float i=(int)((r+0.005)*100);
return i/100;
}
7.135

#include "allinclude.h" //DO NOT edit this line
int func(int n)
{ // Add your code here
int i=0;
int z=n;
int x=z%10;
for(i;z!=0;i++)
{
x=z%10;
z/=10;
}
int y=n%((int)(pow(10,i-1)));
return y;
}
7.175

#include "allinclude.h" //DO NOT edit this line
float func(int n)
{ // Add your code here
int sum=0;
for(int i=1;i
7.184

#include "allinclude.h" //DO NOT edit this line
float func(int n)
{ // Add your code here
float s=0.0;
int sum=0;
for(int j=1;j<=n;j++)
{
sum=0;
for(int i=1;i<=j;i++)
{
sum+=i;
}
s+=1.0/sum;
}
return s;
}
7.187

#include "allinclude.h" //DO NOT edit this line
float func(int n)
{ // Add your code here
float s=0.0;
int sum=0;
for(int j=1;j<=n;j++)
{
sum=1;
for(int i=1;i<=j;i++)
{
sum=i*(i+1);
}
s+=1.0/sum;
}
return s;
}
7.195

#include "allinclude.h" //DO NOT edit this line
int it(int n);
float func(int m, int n)
{ // Add your code here
int t;
if(m
7.205

#include "allinclude.h" //DO NOT edit this line
int func(int n)
{ // Add your code here
int i=0;
int sum=0;
for(i=2;i
7.255

#include "allinclude.h" //DO NOT edit this line
float func(float eps)
{ // Add your code here
int i=1,j=1,s=1;
float n=1.0,t=1.0,si=1.0,sj=1.0;
while(t>eps)
{
si*=i;
sj*=(j+2);
t=si/sj;
n+=t;
i++;
j+=2;
}
return (2*n);
}
7.265

#include "allinclude.h" //DO NOT edit this line
void func(char s[], char t[])
{ // Add your code here
int i,j;
t[1]='\0';
for(i=0,j=0;i
7.275

#include "allinclude.h" //DO NOT edit this line
void func(char s[], int n)
{ // Add your code here
int i,j,k;
for(i=0;s[i]!='\0';i++)
;
j=i-1;
while(s[j]=='*')
{
j--;
}
if(i-1-j>n)
{
s[j+n+1]='\0';
}
}
7.315

#include "allinclude.h" //DO NOT edit this line
int func(int n, int a[])
{ // Add your code here
int i=0;
for(int j=1;j<=n;j++)
{
if(j%7==0||j%11==0)
{
a[i]=j;
i++;
}
}
return i;
}
7.317

#include "allinclude.h" //DO NOT edit this line
int func(int n, int c, int d, int a[])
{ // Add your code here
int i=0;
for(int j=1;j<=n;j++)
{
if(j%c==0&&j%d==0)
{
a[i]=j;
i++;
}
}
return i;
}
7.325

#include "allinclude.h" //DO NOT edit this line
void func(int n, int a[], int c[])
{ // Add your code here
int i,j=0,k=0;
for( i=0;i<=10;i++)
{
k=0;
for(j=0;j
7.335

#include "allinclude.h" //DO NOT edit this line
int func(char a[])
{ // Add your code here
char t,s[100]={0};
int i,j;
for(j=0;a[i]!='\0';)//将a中不同的字符依次存放到s中
{
t=a[i];
while(a[i]==t)
{
i++;
}
s[j]=t;
j++;
}
for(i=0;i
7.345

#include "allinclude.h" //DO NOT edit this line
int func(char s[])
{ // Add your code here
int x=0;
for(int i=0;s[i+1];i++)
{
if(s[i]==' '&&s[i+1]!=' ')
{
x++;
}
}
return x+1;
}
7.355

#include "allinclude.h" //DO NOT edit this line
void func(char s[])
{ // Add your code here
int j=0,i=0,k=0;
for(i=0;s[i];i++)
{
if(s[i]!='*')
{
break;
}
}
for(j=i;s[j];j++)
{
s[j-i]=s[j];
}
for(k=1;k<=i;k++)
{
s[j-k]='*';
}
}
7.513

#include "allinclude.h" //DO NOT edit this line
long func(int a[], int n)
{ // Add your code here
int sum=1;
for(int i=0;i
7.523

#include "allinclude.h" //DO NOT edit this line
long func(int a[], int n)
{ // Add your code here
int sum=0;
for(int i=0;i
7.533

#include "allinclude.h" //DO NOT edit this line
int func(int v[], int n, int k, int c[])
{ // Add your code here
int i,t;
for(i=1;i<=k;i++)
{c[i]=0;}
for(i=0;i
7.535

#include "allinclude.h" //DO NOT edit this line
int func(int v[], int n, int k, int c[])
{ // Add your code here
int i,t,x;
for(i=1;i<=k;i++)
{c[i]=0;}
for(i=0;i
7.563

#include "allinclude.h" //DO NOT edit this line
int func(long n, int d[])
{ // Add your code here
int x;
for(x=0;n;x++)
{
d[x]=n%10;
n/=10;
}
return x;
}
7.565

#include "allinclude.h" //DO NOT edit this line
int func(long n, int d[])
{ // Add your code here
int x;
for(x=0;n;x++)
{
d[x]=n%10;
n/=10;
}
int t;
for(int j=0;j
7.655

#include "allinclude.h" //DO NOT edit this line
void func(char *s, int *num)
{ // Add your code here
int i;
for(i=0;i<5;i++)
num[i]=0;
for(i=0;s[i];i++)
{
if(s[i]=='a'||s[i]=='A')
num[0]++;
if(s[i]=='e'||s[i]=='E')
num[1]++;
if(s[i]=='i'||s[i]=='I')
num[2]++;
if(s[i]=='o'||s[i]=='O')
num[3]++;
if(s[i]=='u'||s[i]=='U')
num[4]++;
}
}
7.675

#include "allinclude.h" //DO NOT edit this line
void func(int s[], int n, int p[])
{ // Add your code here
int i,j=0,k=0;
for(i=0;i<5;i++)
{
p[i]=0;
}
for( i=0;i
7.685

#include "allinclude.h"
void func(int m, int d[], int* n)
{ // Add your code here
int j=0;
for(int i=1;i<=m;i++)
{
if(m%i==0)
{
d[j]=i;
j++;
}
}
*n=j;
}
7.775

#include "allinclude.h" //DO NOT edit this line
void func(char *str,char *key)
{ // Add your code here
int i,j;
int n=0;
for(i=0;key[i];i++)
{
n+=pow((key[i]),2);
}
for(i=0;str[i];i++)
{
if(str[i]>='a'&&str[i]<='z')
{
str[i]=((str[i]+n)%128);
}
}
}