1 条题解

  • 0
    @ 2024-12-24 10:06:01

    C :

    #include<stdio.h>
    int main(){
    int i,j;
    	double a[3],temp;
    	scanf("%lf %lf %lf",&a[0],&a[1],&a[2]);
    	for (i=0;i<2;i++)
    		  for (j=i+1;j<3;j++)
    			if (a[i]>a[j])
    			{
    				temp=a[i];
    				a[i]=a[j];
    				a[j]=temp;
    			}
    for (i=0;i<2;i++)
      printf("%.2lf ",a[i]);
    printf("%.2lf",a[i]);
    printf("\n");
    return 0;
    }
    
    • 1

    信息

    ID
    1765
    时间
    1000ms
    内存
    32MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者