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":24451,"date":"2015-10-08T17:47:06","date_gmt":"2015-10-08T23:47:06","guid":{"rendered":"https:\/\/myfreakingcrazythoughts.wordpress.com\/?p=115"},"modified":"2015-10-08T17:47:06","modified_gmt":"2015-10-08T23:47:06","slug":"quiz-6-17","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/quiz-6-17\/","title":{"rendered":"Quiz #6!"},"content":{"rendered":"

For this quiz we had to create two programs.<\/p>\n

In the first one we had to write a function called superpower that has two parameters of type long and returns a long which is first parameter raised to the power of the second.<\/p>\n

For example, superpower (3, 4) would return 81.<\/p>\n

And in the second program we wrote a function called stars that has one parameter of type int and prints (the function does not return anything) that many stars on a single line followed by a end-of-line character, so if we call the function with stars (5), the function will print like this:<\/p>\n

*****<\/strong><\/p>\n

At first it was hard to write this codes but then, when I looked for help I could notice that actually they were pretty easy and with a few minutes of reading I could understand a little bit more about how the functions work.<\/p>\n

You can check the codes at the bottom of this post or in my GitHub account in the Quizzes Repository<\/a>, it’s up to you!<\/p>\n

Here are the codes of my two programs.<\/p>\n

SuperPower!<\/strong><\/p>\n

<\/p>\n

\n
#include <iostream><\/span>\n#include <cmath><\/span>\n\nusing<\/span> namespace<\/span> std;<\/span>\n\nlong<\/span> superpower<\/span> (<\/span>long<\/span> a,<\/span> long<\/span> b){<\/span>\n  long<\/span> superpower<\/span> =<\/span> 0<\/span>;<\/span>\n  superpower<\/span> =<\/span> pow(a,b);<\/span>\n  return<\/span> superpower;<\/span>\n}<\/span>\n\nint<\/span> main<\/span> (){<\/span>\n cout<<<\/span> superpower(<\/span>3<\/span>,<\/span>4<\/span>)<\/span> <<endl;<\/span>\n\n return<\/span> 0<\/span>;<\/span>\n\n}<\/span>\n<\/pre>\n<\/div>\n

Stars!<\/strong><\/p>\n

\n
#include <iostream><\/span>\nusing<\/span> namespace<\/span> std;<\/span>\n\nvoid<\/span> stars<\/span>(<\/span>int<\/span> iStars){<\/span>\n  for<\/span> (<\/span>int<\/span> i<\/span> =<\/span> 1<\/span> ;<\/span> i<\/span> <=<\/span> iStars;<\/span> i++){<\/span>\n    cout<\/span> <<<\/span> \"*\"<\/span>;<\/span>\n  }<\/span>\n  cout<\/span> <<<\/span> endl;<\/span>\n\n}<\/span>\n\nint<\/span> main<\/span>(){<\/span>\n  stars(<\/span>5<\/span>);<\/span>\n  return<\/span> 0<\/span>;<\/span>\n}<\/span>\n<\/pre>\n<\/div>\n

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

For this quiz we had to create two programs. In the first one we had to write a function called superpower that has two parameters of type long and returns a long which is first parameter raised to the power… Continue Reading →<\/a>\"\"<\/p>\n","protected":false},"author":259,"featured_media":24450,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[582,206,619,633,152,617,729,615],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/24451"}],"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=24451"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/24451\/revisions"}],"predecessor-version":[{"id":24452,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/24451\/revisions\/24452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media\/24450"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=24451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=24451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=24451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}