#include <stdio.h>
#include <stdlib.h>
int main(){
char a=0,b=0,c=0,t=0;
while(scanf(" %c%c%c ",&a,&b,&c)!=EOF){//主要是判断是否文件结束(常用于多组数据输入)
//如果存在逆序的字符,就交换次序。
if(a>b){t=a;a=b;b=t;}
if(a>c){t=a;a=c;c=t;}
if(b>c){t=b;b=c;c=t;}
printf("%c %c %c\n",a,b,c);
}
return 0;
}
#include <stdio.h>
#include <math.h>//sqrt函数需引入的库函数
int main()
{
double x1, x2, y1, y2, a;//取double是方便后面保留两位小数
while (scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2) != EOF)
{
a = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
printf("%.2lf\n", a);
}
return 0;
}
#define PI 3.1415927
#include <stdio.h>
int main()
{
double r,volume;
while(scanf("%lf",&r) != EOF ){
volume=PI*r*r*r*4/3;//体积公式V=4/3*PI*r*r*r;
printf("%.3lf\n",volume);
}
return 0;
}
#include <stdio.h>
#include <math.h>
int main()
{
double a,sum;
while(scanf("%lf",&a) != EOF)
{
sum=fabs(a);// double fabs(double a) math.h库中求绝对值的库函数
printf("%.2lf\n",sum);
}
return 0;
}
#include <stdio.h>
int main()
{
int score;
while(scanf("%d",&score) != EOF){
if(score<0|score>100){//如果不属于0-100的范围就出错
printf("Score is error!\n");
}else if(score<60){//0-60
printf("E\n");
}else if(score<70){//60-70
printf("D\n");
}else if(score<80){//70-80
printf("C\n");
}else if(score<90){//80-90
printf("B\n");
}else{//90-100
printf("A\n");
}
}
return 0;
}