Skip to content

Commit ed1f7ea

Browse files
committed
README sprintf() and One Minute Rule
1 parent 15206cd commit ed1f7ea

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@ $ make pe1154.x SRC=projecteuler.c MAJOR=4 MINOR=2 FORTIFY=0
7979
+ If you want a char, then: `D="SOMETHING=\'A\'"`
8080
- To see more options, `vi makefile` and look the variables there.
8181

82+
## Keep track
83+
84+
When running, your program will capture CTRL-C to print useful information. You can put anything you want printed inside the variable `funcdata[SBUFF]`. Just add this command inside some `loop` and it will update you when you hit CTRL-C:
85+
86+
```
87+
sprintf(funcdata, "Trying r = %lu\n", r);
88+
```
89+
90+
## One minute rule
91+
92+
* Exercises in Project Euler are carefully created to have a correct answer calculated by a good program under ONE MINUTE!
93+
94+
Sometimes your program takes a bit longer, but keep this rule in mind: if it is taking too long, change your algorithm, change the paradigm, change the way you are thinking the whole thing! There is surely a better, faster way!
95+
96+
97+
## Good luck!
98+
99+
82100
# Author & License
83101

84102
* This document and templates were created by:

0 commit comments

Comments
 (0)