#include "al_utility.hpp" bool print_progress(long current, long total, double print_every) { long integer_part = total * print_every; if ( current % integer_part != 0 ) return false; // сделаем потокобезопасным std::stringstream ss; ss << "Progress " << current << " of " << total << " " << std::fixed << std::setw(5) << std::setprecision(2) << 100. * current / total << "%" << std::endl; std::cout << ss.str(); return true; } int get_math_coeff(int k) { return static_cast(pow(1.4, k + 2)); }