+ 1
How to use decimals in c++
C++
2 Respostas
+ 4
Why you tagged Python when your question was in regard to C++? please tag relevant languages only.
And try to search before posting a question
https://code.sololearn.com/W3uiji9X28C1/?ref=app
https://www.sololearn.com/Discuss/2761369/?ref=app
https://www.sololearn.com/Discuss/1797505/?ref=app
+ 1
Benjamin Osei Poku
C++ uses the decimal point to distinguish between floating-point numbers and integers, so a number such as 5.0 is a floating-point number while 5 is an integer. Floating-point numbers must contain a decimal point. Numbers such as 3.14159, 0.5, 1.0, and 8.88 are floating-point numbers.
https://www.oreilly.com/library/view/practical-c-programming/0596004192/ch04.html#:~:text=C%2B%2B%20uses%20the%20decimal%20point,8.88%20are%20floating%2Dpoint%20numbers.