Skip to main content
Logo image

PreTeXt Sample Book: Abstract Algebra (SAMPLE ONLY)

Section 3.2 Code Lens

View Source
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 3.2.1. A Python program, stepable with CodeLens
Listing 3.2.2. An C program, stepable with CodeLens
Listing 3.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 3.2.4. Sieve of Eratosthenes
, Java
Listing 3.2.5. Sieve of Eratosthenes
, C++
Listing 3.2.6. Sieve of Eratosthenes
, Java