Skip to main content
Logo image

PreTeXt Sample Book: Abstract Algebra (SAMPLE ONLY)

Section 5.2 Code Lens

CodeLens is an interactive tool for following program execution, much like a debugger, without the ability to influence flow control or variable values. For use without a server, traces must be computed beforehand. First, we have some trivial programs, to provide minimal testing.
Listing 5.2.1. A Python program, stepable with CodeLens
Listing 5.2.2. An C program, stepable with CodeLens
Listing 5.2.3. A Java program, stepable with CodeLens
Now some moderately more complicated programs to find teh prime numbers less than \(20\text{.}\) We do not vouch for the quality of these, or even their correctness!
Listing 5.2.4. Sieve of Eratosthenes
 1 
www.tutorialspoint.com/python-program-for-sieve-of-eratosthenes
, Java
Listing 5.2.5. Sieve of Eratosthenes
 2 
www.tutorialspoint.com/cplusplus-program-to-implement-sieve-of-eratosthenes-to-generate-prime-numbers-between-given-range
, C++
Listing 5.2.6. Sieve of Eratosthenes
 3 
www.tutorialspoint.com/Sieve-of-Eratosthenes-in-java
, Java