Skip to content

Instantly share code, notes, and snippets.

@christianc1
Created September 10, 2015 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianc1/e29c20b8d9a9d44116ff to your computer and use it in GitHub Desktop.
Save christianc1/e29c20b8d9a9d44116ff to your computer and use it in GitHub Desktop.
The answer to Alex's Homework
int main() {
int givenyear = 0;
givenYear = 1776;
if ( givenYear >= 2100 ) {
cout<<"Distant future";
}
else if( givenYear >= 2000 ) {
cout<<"21st century";
}
else if( givenYear >= 1900 ) {
cout<<"20th century";
}
else {
cout<<"Long ago";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment