Greatest Common Divisor
Find a file
2025-09-17 21:45:48 +02:00
src Finished 2025-09-17 21:45:48 +02:00
.gitignore Finished 2025-09-17 21:45:48 +02:00
gcd.iml Finished 2025-09-17 21:45:48 +02:00
README.md Revise README for Assignment 1 on GCD 2025-09-17 10:28:47 +02:00

IF.05.22 Theoretical Informatics

Assignment 1: Coding Assignment - Greatest Common Divisor

Objective

This week's assignment is to get you familiar with Java, repeat recursion and easy algorithmic stuff.

Materials

  • Java IDE you use in the Java class.

Required Tasks

  1. Write a Java program that calculates the gcd by calculating the the product of the common prime factors
  2. Write a Java program that calculates the gcd by using the Euclidean algorithm using the mod operator as presented in class
  3. Implement a main method which calls your methods with test data. Test thoroughly.

Evaluation

We will start to train the tick and present exercise format which we will use throughout the rest of this course. Therfore, I will hand over a tick list at the beginning of the session. If you have prepared the programs thoroughly and you feel ready to present and explain your algorithms (to be done without any supporting material) you tick the exercise(s). If you get called by my directed random number generator you have to present your algorithm in front of the class.