杭电OJ2003求绝对值
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double t;
while(cin>>t)
{
if(t<0)
t = -t;
cout <<fixed<<setprecision(2)<<t<< endl;
}
return 0;
}
杭电OJ2003求绝对值
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double t;
while(cin>>t)
{
if(t<0)
t = -t;
cout <<fixed<<setprecision(2)<<t<< endl;
}
return 0;
}