/ Published in: Java
The solution to Project Euler [Problem 1](http://projecteuler.net/index.php?section=problems&id=1), written in Java as an example for my AP Computer Science class teaching internship.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public class Euler { int sum = 0; for (int counter = 1; counter < 1000; counter++) { if ((counter % 3) == 0 || (counter % 5) == 0) { sum += counter; } } } }