Verhoeff algorithm: Difference between revisions
→{{header|C++}}
Line 268:
std::string calculationType = doValidation ? "Validation" : "Check digit";
std::cout << calculationType << " calculations for " << number << "\n" << std::endl;
std::cout << " i ni p[i, ni] c" << std::endl;
std::cout << "-------------------" << std::endl;
}
Line 284:
if ( doDisplay ) {
printf("%2d
}
}
if ( doDisplay && ! doValidation ) {
std::cout << "
}
|