This task was about doing a programm that could calculate the GCD of two given integers using the euclids algorithm. At first i got confused because i though i could do it by using the % operator, but after doing some research about the euclids algorithm i found that is way more easy to do it that way.<\/p>\n
The code i wrote is in here: https:\/\/github.com\/sabaldaba\/TC101\/blob\/master\/wsq12-GCD<\/a><\/p>\n <\/p>\n Basicaly you use two “if” inside two while loops. You just have to sustract the smaller to the bigger and thats pretty much all of it.<\/p>\n Hope you enjoy it!<\/p>\n <\/a> <\/p>\n","protected":false},"excerpt":{"rendered":" This task was about doing a programm that could calculate the GCD of two given integers using the euclids algorithm. At first i got confused because i though i could do it by using the % operator, but after doing… Continue Reading →<\/a><\/p>\n","protected":false},"author":202,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[39],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26463"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/202"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=26463"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26463\/revisions"}],"predecessor-version":[{"id":26665,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26463\/revisions\/26665"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=26463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=26463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=26463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}