2000
#include<stdio.h>
int main()
{
int i,j;
char ch[4],temp;
while(scanf("%s",&ch)!=EOF)
{
for (i=0;i<3;i++)
{
for(j=i;j<3;j++)
if(ch[i]>ch[j])
{
temp=ch[i];
ch[i]=ch[j];
ch[j]=temp;
}
}
printf("%c %c %c/n",ch[0],ch[1],ch[2]);
}
return 0;
}
//_________________________________//
#include<stdio.h>
int main()
{
int i,j;
char ch[4],temp;
while(scanf("%c",&ch[0])!=EOF)
{
for(i=1;i<4;i++)
{scanf("%c",&ch[i]);
if(ch[i]==EOF) break;}
for (i=0;i<3;i++)
{
for(j=i;j<3;j++)
if(ch[i]>ch[j])
{
temp=ch[i];
ch[i]=ch[j];
ch[j]=temp;
}
}
printf("%c %c %c/n",ch[0],ch[1],ch[2]);
}
return 0;
}
//_________________________________________________//
2001
#include<stdio.h>
#include<math.h>
int main()
{
float x1,y1,x2,y2,dis;
while (scanf("%f %f %f %f",&x1,&y1,&x2,&y2)!=EOF)
{
dis=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
printf("%.2f/n",dis);
}
return 0;
}
//_________________________
2002
#include<stdio.h>
#include<math.h>
#define PI 3.1415927
int main()
{
double r;
while(scanf("%lf",&r)!=EOF)
{
printf("%.3f/n",4.0*r*r*r*PI/3.0);
}
return 0;
}
//________________________
2003
#include<stdio.h>
#include<math.h>
int main()
{
double r;
while(scanf("%lf",&r)!=EOF)
{
printf("%.2lf/n",fabs(r));
}
return 0;
}
//_________________________________
2005
#include<stdio.h>
int main()
{
int y,m,d,i,days=0;
int ordim[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},
rm[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
while(scanf("%d/%d/%d",&y,&m,&d)!=EOF)
{
days=0;
if(y%4==0&&y%100!=0||y%400==0)
{
for(i=0;i<m;i++)
days+=rm[i];
days+=d;
}
else
{
for(i=0;i<m;i++)
{ days+=ordim[i];}
days+=d;
}
printf("%d/n",days);
}
return 0;
}
//2004_______________________________--
#include<stdio.h>
int main()
{
int score;
while(scanf("%d",&score)!=EOF)
{
if(score>89&score<=100)
printf("A/n");
if(score>79&score<90)
printf("B/n");
if(score>69&score<80)
printf("C/n");
if(score>59&score<70)
printf("D/n");
if(score>0&score<60)
printf("E/n");
if(score>100|score<0)
printf("Score is error!/n");
}
return 0;
}
//_____________________________________2006
#include<stdio.h>
int main()
{
int i,n,isj,result=1;
while(scanf("%d",&n)!=EOF)
{
result=1;
for(i=0;i<n;i++)
{ scanf("%d",&isj);
if(isj%2!=0)
result*=isj;
}
printf("%d/n",result);
}
return 0;
}