Babbage problem: Difference between revisions

Content deleted Content added
Rdm (talk | contribs)
m J: align comments, for emphasis
Line 83: Line 83:


The smallest of these values is 25264.
The smallest of these values is 25264.

=={{header|Java}}==
<lang java>public class Test {

public static void main(String[] args) {

// let n be zero
int n = 0;

// repeat the following action
do {

// increase n by 1
n++;

// while the modulo of n times n is not equal to 269696
} while (n * n % 1000_000 != 269696);

// show the result
System.out.println(n);
}
}</lang>
<pre>25264</pre>


=={{header|Processing}}==
=={{header|Processing}}==