2 solutions

  • 1
    @ 2025-9-14 15:51:12

    #include<bits/stdc++.h> using namespace std; int main() { double x; cin>>x; double cost; if(x<=20) { cost=x1.68; } else { cost=x1.98; } cout<<fixed<<setprecision(2)<<cost; return 0; }

    • 0
      @ 2024-12-15 14:49:58
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	double x;
      	cin>>x;
      	double cost;
      	if(x<=20)
      	{
      		cost=x*1.68;
      	}
      	else
      	{
      		cost=x*1.98;
      	}
      	cout<<fixed<<setprecision(2)<<cost;
      	return 0;
      }
      
      • 1

      Information

      ID
      21
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      263
      Accepted
      82
      Uploaded By