2 条题解

  • 0
    @ 2025-4-19 20:38:56

    哎我偏不用

    #include <bits/stdc++.h>
    using namespace std;
    double inx[5];
    int main()
    {
    	cin>>inx[0];
    	cin>>inx[1];
        cin>>inx[2];
        double maxn=-1;
        maxn=max(maxn,inx[0]);
        maxn=max(maxn,inx[1]);
        maxn=max(maxn,inx[2]);
        printf("%.3f\n%.3f",maxn,maxn);
    	return 0;
    }
    
    
    • 0
      @ 2024-12-22 11:04:49

      C :

      #include<stdio.h>
      #define MAX(x,y) (x)>(y)? (x):(y)
      double max(double x,double y,double z)
      {
      	double a;
      	a=x>y?x:y;
      	return(a>z?a:z);
      }
      int main()
      {
      	double a,b,c;
      	scanf("%lf%lf%lf",&a,&b,&c);
      	printf("%.3lf\n",max(a,b,c));
      	printf("%.3lf\n",MAX(MAX(a,b),c));
      	return 0;
      }
      
      • 1

      信息

      ID
      395
      时间
      1000ms
      内存
      128MiB
      难度
      10
      标签
      递交数
      1
      已通过
      1
      上传者