1 条题解

  • 0
    @ 2025-4-12 21:43:14

    C++ :

    #include<iostream>
    #include<iomanip>
    using namespace std;
    int main()
    {int a=35,b=8;
    float c;
    cout<<setw(3)<<a+b<<endl;
    cout<<setiosflags(ios::fixed);
    cout.precision(2);
    c=(a+b)/2.00;
    cout<<setw(5)<<c<<endl;
    return 0;
    }
    

    Pascal :

    var a,b:integer;
    begin
      a:=35;
      b:=8;
      writeln(a+b:3);
      writeln((a+b)/2:5:2);
    end.
    
    • 1

    信息

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