{"id":35063,"date":"2016-04-05T22:21:31","date_gmt":"2016-04-06T03:21:31","guid":{"rendered":"http:\/\/josequirogablog.wordpress.com\/?p=325"},"modified":"2016-04-05T23:31:49","modified_gmt":"2016-04-06T04:31:49","slug":"quiz-6-euclides","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/quiz-6-euclides\/","title":{"rendered":"Quiz 6 Euclides"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-327\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/6e9143d85a644636c9b3b57721122d50.jpg\" alt=\"matemazz39\"   \/><\/p>\n<p>In this quiz we had to make a program that tells you the greatest common divisor between two integer numbers. So the program asks for the biggest number and then the smallest.<\/p>\n<p>For this we have to use the Euclid&#8217;s Algorithm: (Wikipedia obviously)<\/p>\n<p>The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, 21 is the GCD of 252 and 105 (252\u00a0=\u00a021\u00a0\u00d7\u00a012 and 105\u00a0=\u00a021\u00a0\u00d7\u00a05), and the same number 21 is also the GCD of 105 and 147\u00a0=\u00a0252\u00a0\u2212\u00a0105. Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until one of the two numbers reaches zero. When that occurs, the other number (the one that is not zero) is the GCD of the original two numbers.<\/p>\n<p>Here is a video, it\u00b4s in Spanish but explains this quite\u00a0good:<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe class='youtube-player' type='text\/html' width='1000' height='593' src='https:\/\/www.youtube.com\/embed\/x6qFMSRpgpM?version=3&#038;rel=1&#038;%23038;fs=1&#038;%23038;autohide=2&#038;%23038;showsearch=0&#038;%23038;showinfo=1&#038;%23038;iv_load_policy=1&#038;%23038;wmode=transparent' allowfullscreen='true' style='border:0;'><\/iframe><\/div>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-335\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/c12aaed152ce7965ebce0ac63837f177.jpg\" alt=\"Captura de pantalla 2016-04-05 a las 10.01.02 p.m.\"   \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-336\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/faadd0590907ac5c91484591352c69e0.jpg\" alt=\"Captura de pantalla 2016-04-05 a las 10.01.42 p.m.\"   \/><\/p>\n<h3>Thanks to <strong><a href=\"https:\/\/baruquismen.wordpress.com\/\" >Baruch<\/a><\/strong> who taught\u00a0me how to make the loop.<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-337\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/98027af73b0504c1ee1bfa02c27ceec0.jpg#038;h=286\" alt=\"thak you\" width=\"507\" height=\"286\" \/><\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/josequirogablog.wordpress.com\/325\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/b0b123f73d486c8a5cc59b235962e06b.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/4401e2cf60b5b7eea2fc279284490ca4.jpg#038;blog=105339983&#038;%23038;post=325&#038;%23038;subd=josequirogablog&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this quiz we had to make a program that tells you the greatest common divisor between two integer numbers. So the program asks for the biggest number and then the smallest. For this we have to use the Euclid&#8217;s Algorithm: (Wikipedia obviously) The Euclidean algorithm is based on the principle that the greatest common &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/quiz-6-euclides\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Quiz 6 Euclides<\/span><\/a><\/p>\n","protected":false},"author":18,"featured_media":35064,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[55,20],"class_list":["post-35063","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-programming","tag-quiz"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/35063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=35063"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/35063\/revisions"}],"predecessor-version":[{"id":35076,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/35063\/revisions\/35076"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/35064"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=35063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=35063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=35063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}