Advertisement
ScriptedArtsOfficial

42

Jan 27th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. The answer to the ultimate question of life, the universe and everything, is 42.
  2.  
  3. !The Algorythm
  4. #include <stdlib.h>
  5. #include <limits.h>
  6.  
  7. #define SECONDS_IN_A_YEAR 31557600LL
  8. void wait(long long int seconds){
  9. while (seconds >0){
  10. int s=seconds > int_max ? int_max : seconds;
  11. sleep(s);
  12. seconds -= s;
  13. }
  14. }
  15.  
  16. int deep_thought(){
  17. wait(7500000LL * SECONDS_IN_A_YEAR);
  18. return 42;
  19. )
  20.  
  21. int main (){
  22. printf("The answer to the ultimate question of life, the universe,"
  23. " and everything is %d", deep_thought.());
  24. return EXIT_SUCCESS;
  25. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement