Cullen and Woodall numbers: Difference between revisions
Minor Improvements to code.
m (Correcting spelling mistake.) |
(Minor Improvements to code.) |
||
Line 529:
enum NumberType { Cullen, Woodhall };
uint32_t next_number(const NumberType& number_type) {
number += 1;
power <<= 1;
Line 539:
}
void number_sequence(const uint32_t& count, const NumberType& number_type) {
std::string type = ( number_type == Cullen ) ? "Cullen" : "Woodhall";
std::cout << "The first " << count << " " << type << " numbers are:" << std::endl;
|