题解 | 牛牛学说话之-浮点数
【模板】牛牛学说话之-浮点数
https://www.nowcoder.com/practice/7c3bf58fac1a4eb69fa32c2d2c379bac
#include <iostream>
using namespace std;
int main() {
double x;
//cout<<"Please input a float number x which extends between 0 and 2 and has 6 numbers behind the dot"<<endl;
cin>>x;
if (x<0 || x>2)
cout<<"Illegal Input"<<endl;
else cout<<x<<endl;
return 0;
}
但是不明白为何同一个数的输出和输入会涉及到实数的计算()
#学习交流#
查看2道真题和解析