运行下列程序,若输入:2↙,则输出结果是( )。
#include <iostream>
using namespace std;
int main()
{
float x,y;
cin >> x;
if(x<0.0) y=0.0;
else if(x<10.0) y=1.0/x;
else y=1.0;
cout << y << endl;
return 0;
}
0.0
1.00
0.5
0.50