23 条题解

  • -3
    @ 2023-7-30 14:41:12
    #include<iostream>
    #include<iomanip>
    using namespace std;
    int main()
    {
        double a=3.14159265857;
        cout << fixed << setprecision(x) << a;
        x代表具体要保留几位。
         returb 0;
        请务必自己多敲几遍代码,这个单词比较长避免考场出到原题自己单词忘了
    }
    喜欢点个赞❤️
    
    • -5
      @ 2023-11-4 20:18:06

      实在是简单呀

      • -11
        @ 2022-5-10 14:45:41

        保留 x 位小数

        方法 1

        • 头文件:#include <cstdio>
        • 语句: printf("%.xf", a);

        方法 2

        • 头文件:#include<iostream>#include<iomanip>
        • 语句:cout << fixed << setprecision(x) << a;

        注意

        如果题目说保留 xx 位小数,那么就按照这种方式输出就可以了。

        #include<iostream>
        #include<iomanip>
        using namespace std;
        int main()
        {
            double a=3.14159265857;
            cout << fixed << setprecision(x) << a;
            x代表具体要保留几位。
        
            请务必自己多敲几遍代码,这个单词比较长避免考场出到原题自己单词忘了
        }
        
        #include<iostream>
        #include <cstdio>
        using namespace std;
        int main()
        {
            double a=3.14159265857;
            printf("%.xf", a);
            x代表具体要保留几位。
        
            请务必自己多敲几遍代码,这个单词比较长避免考场出到原题自己单词忘了
        }
        
        
        • @ 2022-7-7 23:12:31

          ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. ................................................................................................................................................................. .................................................................................................................................................................

        • @ 2022-8-12 22:05:13

          @张文昊 (hetao342043@hetao101.com) 请不要刷屏,如果不喜欢他人的题解,也请不要刷屏,要维护秩序,谢谢

        • @ 2022-8-12 22:05:48

          @张文昊 (hetao342043@hetao101.com) 况且人家是 SU!超级管理员!

        • @ 2022-8-29 12:43:10

          请不要刷频哟,人家US!( ^__^ ) 防拉黑!@

        • @ 2022-8-29 12:46:14

          SU

        • @ 2023-2-26 15:20:59

          老师,没学过printf怎么办?😕 【忠诚】【忠诚】

        • @ 2023-5-12 12:58:07

          张文昊 (hetao342043@hetao101.com) 请不要刷屏

        • @ 2023-5-12 12:58:33

          @张文昊 (hetao342043@hetao101.com) 请不要刷屏

        • @ 2024-1-24 12:38:02

          SU 是Super Administrator的缩写!!!

        • @ 2024-2-5 17:47:22

          @ image

      信息

      ID
      867
      时间
      1000ms
      内存
      16MiB
      难度
      4
      标签
      递交数
      2804
      已通过
      1376
      上传者