Skip to main content
Logo image

PreTeXt Sample Book: Abstract Algebra (SAMPLE ONLY)

Section 5.3 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.3.1. A Python program, stepable with CodeLens
Listing 5.3.2. An C program, stepable with CodeLens
Listing 5.3.3. A Java program, stepable with CodeLens
Now some moderately more complicated programs to find teh prime numbers less than 20. We do not vouch for the quality of these, or even their correctness!
Listing 5.3.4. Sieve of Eratosthenes
 1 
www.tutorialspoint.com/python-program-for-sieve-of-eratosthenes
, Java
Listing 5.3.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.3.6. Sieve of Eratosthenes
 3 
www.tutorialspoint.com/Sieve-of-Eratosthenes-in-java
, Java
You have attempted 1 of 2 activities on this page.