Software Tool

Last Updated December 2023

INSTRUCTOR: DR. WENDY WRITER

no_reply@example.com

horizontal line

Introduction

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan.

Lorem ipsum dolor

Following is some source code listing pasted from IntelliJ/IDEA to demonstrate code formatting:

public class PrimeMain {

   public static int cnt = 0;

   private static boolean isPrime(int num) {

       if (num == 2)

           return true;

       if (num < 2 || num % 2 == 0)

           return false;

       for (int i = 3; i * i <= num; i += 2)

           if (num % i == 0)

               return false;

       return true;

   }

   public static void main(String[] args) {

       System.out.println("Starting...");

       long start = System.currentTimeMillis();

       for (int i = 2; i < Math.pow(10, 4); ++i) {

           if (isPrime(i)) {

               cnt++;

           }

       }

       System.out.println("Finding " + cnt + " primes took: " +

           (System.currentTimeMillis() - start) + "ms");

   }

}

This page was built from this document.