Код: Выделить всё
#include "std_lib_facilities.h"
int main()
{
double num1 = 8.8;
double num2 = 8.79;
double test = 0.01;
if(num1-test==num2)
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78743851/if-statement-strange-behavior-with-floating-point-arithmetic[/url]
Мобильная версия