+ 3
Irrational numbers in c++
Hello, I am a beginner with the C++ programming language and the only data types I really know are int , float, double, and bool. From what I managed to understand, however, is that these data types deal only with rational numbers. I was wondering if anyone knew how to utilize irrational numbers in C++? I’d appreciate any help :)
2 Respostas
+ 3
I think you're mistaken, int is used to store integer number, boolean is only true or false (not really a number, more like a state), float and double are used to store fractional number whether it's rational or not, so you can use those to deal with irrational number
+ 3
ok thank you. i’ll try that