4 solutions

  • 0
    @ 2025-3-7 22:29:46

    #include<bits/stdc++.h> using namespace std; double a; int main() { cin>>a; cout<<fixed<<setprecision(2)<<abs(a); return 0; }

    • 0
      @ 2024-7-9 19:49:20
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	double a;
      	cin>>a;
      	if(a<0)
      	{
      		a=a*-1;
      	}
      	cout<<fixed<<setprecision(2)<<a;
      	return 0;
      
      • -1
        @ 2025-1-11 11:23:45

        #include<bits/stdc++.h> using namespace std; int main() { double a; cin>>a; if(a<0) { a=a*-1; } cout<<fixed<<setprecision(2)<<a; return 0; }

        • -1
          @ 2025-1-11 11:23:27

          #include<bits/stdc++.h> using namespace std; int main() { double a; cin>>a; if(a<0) { a=a*-1; } cout<<fixed<<setprecision(2)<<a; return 0; }

          • 1

          Information

          ID
          854
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          1
          Tags
          (None)
          # Submissions
          260
          Accepted
          75
          Uploaded By