Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":26539,"date":"2015-11-21T18:39:10","date_gmt":"2015-11-22T00:39:10","guid":{"rendered":"http:\/\/myfreakingcrazythoughts.wordpress.com\/?p=182"},"modified":"2015-11-21T18:39:10","modified_gmt":"2015-11-22T00:39:10","slug":"euclids-algorithm","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/euclids-algorithm\/","title":{"rendered":"Euclids Algorithm"},"content":{"rendered":"

In this WSQ I had to write a code in which I could use the already known Euclids Algorithm to find the Greatest Common Divisior of two numbers that will be asked to the user.<\/p>\n

Euclids Algorithm:<\/p>\n

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.<\/p>\n

Here is the code of the program.<\/p>\n

\n
#include <iostream><\/span>\nusing<\/span> namespace<\/span> std;<\/span>\n\nint<\/span> gcd<\/span>(<\/span>int<\/span> a,<\/span> int<\/span> b){<\/span>\/\/Making the function<\/span>\n\tint<\/span> g=a;<\/span>\n\tint<\/span> h,l;<\/span>\n\tint<\/span> f=<\/span>2<\/span>;<\/span>\n\tif<\/span>(a==<\/span>0<\/span>){<\/span>\n\t\treturn<\/span> a;<\/span>\n\t}<\/span>\n\t\twhile<\/span>(g><\/span>0<\/span>){<\/span>\/\/Doing a loop<\/span>\n\t\tif<\/span>(g==<\/span>0<\/span>){<\/span>\n\t\t\tgoto<\/span> exit;<\/span>\n\t\t}<\/span>\n\t\tg=a%b;<\/span>\n\t\ta=b;<\/span>\n\t\tb=g;<\/span>\n\t\t}<\/span>\n\tif<\/span> (l=<\/span>1000<\/span>){<\/span>\n\texit:<\/span>\n\tg=a;<\/span>\n\t}<\/span>\n\treturn<\/span> g;<\/span>\n}<\/span>\n\nint<\/span> main<\/span>(){<\/span>\nint<\/span> a,<\/span> b;<\/span>\ncout<<<\/span>\"Please introduce the first number\"<\/span><<endl;<\/span>\ncin>>a;<\/span>\ncout<<<\/span>\"Please introduce the second number\"<\/span><<endl;<\/span>\ncin>>b;<\/span>\ncout<<endl;<\/span>\n\ncout<<<\/span>\"Your Greatest Common Divisor is: \"<\/span><<gcd(a,b)<<endl;<\/span>\n\nreturn<\/span> 0<\/span>;<\/span>\n}<\/span>\n<\/pre>\n<\/div>\n

 <\/p>\n

Also, Here is the link to the code in Github: BATMAN.<\/a><\/p>\n

And of course, as always, the picture of the execution of the program on Cygwin.<\/p>\n

\"Euclids<\/p>\n

-The Admin.<\/p>\n

 <\/p>\n

\"\"<\/a> \"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

In this WSQ I had to write a code in which I could use the already known Euclids Algorithm to find the Greatest Common Divisior of two numbers that will be asked to the user. Euclids Algorithm: The Euclidean algorithm… Continue Reading →<\/a>\"\"<\/p>\n","protected":false},"author":259,"featured_media":26537,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[582,206,356,839,618,152,617,614,615],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26539"}],"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\/259"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=26539"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26539\/revisions"}],"predecessor-version":[{"id":26540,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26539\/revisions\/26540"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media\/26537"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=26539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=26539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=26539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}