如果我的问题不正确,请忘记我。我是 C++ 的初学者。我刚刚用 C++ 写了一个简单的程序我的代码是:
#include<iostream> using namespace std; int main() { float a,b,c; a=0; b=-5; c=a/b; cout<<c; }
当我运行此代码时,输出为 -0。答案怎么可能是 -0 而 -0 不存在?
c++ floating-point
c++ ×1
floating-point ×1