For this wsq I had to make a program that asks the user for two positive integer numbers and returns the greatest common divisor between those two numbers.<\/p>\n
First of all, I defined a function with wich, using Euclid’s algorithm I could accomplish the objective of the task, I just created a recursive function using some if’s and elses according to the criteria.<\/p>\n
Outside the function, in the actual coding, I created some loops to verify that the input users were the intended inputs, avoiding errors of data-type.Also, I created an extra loop containing the whole code to keep asking for more values until the user decides to stop.<\/p>\n
Here is my code: https:\/ #TC1014<\/a> #wsq12<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" For this wsq I had to make a program that asks the user for two positive integer numbers and returns the greatest common divisor between those two numbers.First of all, I defined a function with wich, using Euclid’s algorithm I could accomplis… Continue reading