#include <cstdlib>
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{
double a;
while(cin >> a)
{
cout << fixed << setprecision(2);
if(a>=0.01 && a<=100)
cout << "$" << a*0.9+8 <<endl;
else if(a>=100.01 && a<=500)
cout << "$" << a*0.8 <<endl;
else if(a>=500.01 && a<=10000000)
cout << "$" << a*0.6 <<endl;
}
return EXIT_SUCCESS;
}
與正確輸出不相符(line:3)
您的答案為: $552.76
正確答案為: $552.75
差了0.01?