9 条题解

  • 4
    @ 2023-5-11 21:43:45

    这题直接用printf里面的%.2f就行,代码如下~

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        double x, y, temp = 0;
        cin >> x >> y;
        temp = x * y;
        printf ("%.2f",temp);
        return 0;
    }
    
  • 2
    @ 2023-8-15 16:52:25
    /*********************************
    备注:
    *********************************/
    #include <iostream>
    #include <cstdio>
    #include <iomanip>
    #include <cmath>
    #include <math.h>
    #include <algorithm>
    #include <cstring>
    #include <string>
    #include <stack>
    #include <queue>
    #include <algorithm>
    #define LL long long
    using namespace std;
    const int INF = 0x3f3f3f3f;
    const int N = 1e5 + 10;
    double n , m;
    int main()
    {
    	cin >> n >> m;
    	double zzz = n * m;
    	cout << fixed << setprecision(2) << zzz << endl;
    	return 0;
    }
    
    • 1
      @ 2023-1-23 15:10:12
      #include <iostream>
      using namespace std;
      int main(){
          double a,b;
          scanf("%lf%lf",&a,&b);
          printf("%.2lf",a*b);
          return 0;
      }
      
      
      • 1
        @ 2022-8-24 22:24:45
         #include <bits/stdc++.h>
        
        using namespace std;
        
        int main(void)
        {
        	float x, y;
        
        	cin >> x >> y;
        
        	printf("%.2f", x * y);
        
        	return 0;
        }
        
        • 1
          @ 2022-1-25 10:15:57
          #include <stdio.h>
          #include <iostream>
          using namespace std;
          int main()
          {
          	double x,y;
          	cin >> x >> y;
          	printf("%.2lf",x*y);
          }
          
          • -1
            @ 2022-9-23 21:19:19

            #include<stdio.h> #include<iostream> using namespace std; int main() { double x,y; cin >> x >> y; printf("%.2lf,x*y);

            return 0;
            

            }

            • -1
              @ 2022-7-2 10:01:48

              #include <stdio.h> #include <iostream> using namespace std; int main() { double x,y; cin >> x >> y; printf("%.2lf",x * y); }

              • -1
                @ 2022-7-1 18:13:48

                #include<stdio.h> #include<iostream> #include<iomanip> using namespace std; int main() { double x,y; cin>>x>>y; cout<<fixed<<setprecision(2)<<x*y<<endl; }

                • -2
                  @ 2022-1-21 23:02:34
                  #include <iostream>
                  #include <iomanip>
                  using namespace std;
                  int main(){
                      double x,y;
                      cin>>x>>y;
                      cout<<fixed<<setprecision(2)<<x*y<<endl;
                      return 0;
                  }
                  
                  • 1

                  信息

                  ID
                  828
                  时间
                  1000ms
                  内存
                  128MiB
                  难度
                  3
                  标签
                  递交数
                  793
                  已通过
                  414
                  上传者