I know that the infinite sign is like 8 but flat... what about in c++? how would code/type the infinite number sign/code?
thx
Last edited on
1 2 3 4 5 6 7 8 9 10
|
#include <iostream>
#include <limits>
int main()
{
double max = std::numeric_limits<double>::max();
double inf = std::numeric_limits<double>::infinity();
if(inf > max)
std::cout << inf << " is greater than " << max << '\n';
}
| |
http://en.cppreference.com/w/cpp/types/numeric_limits/infinity
Last edited on