MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / year

Function year

Exercises/Modules/Chapter 08/Soln8_01.cpp:47–52  ·  view source on GitHub ↗

Reads the year

Source from the content-addressed store, hash-verified

45
46// Reads the year
47int year()
48{
49 const int low_year {1870}; // Program only works for folks under 150 years old
50 const int high_year {2020}; // and those already born...
51 return validate_input(low_year, high_year, "a year");
52}
53
54// Reads the month
55int month()

Callers 1

mainFunction · 0.70

Calls 1

validate_inputFunction · 0.70

Tested by

no test coverage detected