Created
April 27, 2020 02:17
-
-
Save domiyanyue/c3db672f7c8d6b04d3a13fee0f9f6f4a to your computer and use it in GitHub Desktop.
example_struct_header_2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "util.h" | |
int main(){ | |
// set to 9:10 | |
Time t(9, 10); | |
return isDayTime(t); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "util.h" | |
bool isDayTime(Time t) { | |
return t.hour >=8 && t.hour <= 19; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment