2 ms·
As Baq said, programs must: - be executable - (optional) take input from somewhere (e.g. stdin, or command line arguments) - (optional) write output (e.g., pri
by gknoy 12y ago
As Baq said, programs must:
- be executable
- (optional) take input from somewhere (e.g. stdin, or command line arguments)
- (optional) write output (e.g., print statements)
Would you be able to write a small script that implements solutions for Project Euler? (Even just a few of them.)
- You don't need any input at first, because the problems are already specified.
- You can write a separate program for each problem, or just comment out calls to each exercise's solver
- Brute force is OK for many early problems
- You probably know enough to write a function that solves an easy one (e.g., Nth fibonacci number)
Once you write such a function, you should be able to find out how to write an executable program in your language, and then you're off to the races: Run it over and over from the command line until you (a) stop getting errors, and (b) get an answer that you can defend and understand. :)