Weekly Quiz
Write your code for the quiz, then:
- email your answers (as file attachments) to Ken.
- Most important: blog about your answers. You should explain the code, your process and link to code on GitHub.
The Quiz (same for both C++/Python)
- Write a function to calculate the greatest common denominator of two positive integers using Euclid’s algorithm.
What to Do
The function should receive two integers and return an integer.Obviously you should test your function, so create a main program that asks the user for two values, calculates the gcd and displays that. This page may help https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/the-euclidean-algorithm
Get Creative, put style in your Blog Posts
Make the posts your expression, be good internet citizens but also have fun!
Quiz 06 by Ken Bauer is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
One thought on “Quiz 06”