Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include <iostream>
/**
* @brief Identify if the given value is 42.
*
* The ultimate answer to life, the universe, and everything is 42.
* Read "The Hitchhiker's Guide to the Galaxy" by Douglas Adams
* if you are confused by my sense of humour.
*
* @param value The value to check.
* @return true If the value is 42.
* @return false If the value is not 42.
*/
// IS_ULTIMATE_ANSWER FUNCTION
int main()
{
/* By using std::boolalpha here I can get std::cout to print "true"
and "false" for booleans instead of just 1 and 0. */
std::cout << std::boolalpha << is_ultimate_answer( 42 ) << std::endl;
std::cout << std::boolalpha << is_ultimate_answer( 535 ) << std::endl;
return 0;
}