Iccanobif primes: Difference between revisions
Content deleted Content added
Added C++ solution |
m C++ - simplified code |
||
Line 500: | Line 500: | ||
size_t len = str.size(); |
size_t len = str.size(); |
||
if (len > max_digits) { |
if (len > max_digits) { |
||
str.replace(max_digits / 2, len - max_digits, "..."); |
|||
str.substr(len - max_digits / 2); |
|||
str += " ("; |
str += " ("; |
||
str += std::to_string(len); |
str += std::to_string(len); |