Home c++ C++ does not disable a real number

C++ does not disable a real number [Duplicate]

Author

Date

Category

}
Displays an integer, and it is necessary real.
Thanks in advance


Answer 1, Authority 100%

You share

summa / rate_count;

The whole – and the division is integer, i.e. Giving integer …

Make, for example, so:

float (summa) / rate_count;

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions