Greatest Common Divisor
| .gitignore | ||
| README.md | ||
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
- Write a Java program that calculates the gcd by calculating the the product of the common prime factors
- Write a Java program that calculates the gcd by using the Euclidean algorithm using the mod operator as presented in class
- 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.