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":25208,"date":"2015-10-28T19:58:53","date_gmt":"2015-10-29T01:58:53","guid":{"rendered":"http:\/\/opezaimd.tumblr.com\/post\/132120732465"},"modified":"2015-10-28T19:58:53","modified_gmt":"2015-10-29T01:58:53","slug":"mastery-20-3","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/mastery-20-3\/","title":{"rendered":"Mastery 20"},"content":{"rendered":"

On this mastery I will show you what a FOR loop in C++ is and how to use it.<\/p>\n

A FOR loop is a type of loop which allows you to give specific conditions to it, and then repeat when this conditions are true.\u00a0
A for loop consists of four parts: an initializer (declaration of what happens first to the variable; it only happens once), a condition (evaluates and proceeds with the code if its true, if not it will stop), an incremet (this updates the variable after the code is completed and increments the variable), and the statement (what will happen when the conditions are true). In a flow chart, for loops look something like this:<\/p>\n

<\/figure>\n

Now, let\u2019s create a program which displays the factorial of a given number. Factorial is the result of the multiplication of all numbers starting from 1 to the number you want to know its factorial. For example, 5 factorial is 1 x 2 x 3 x 4 x 5 which = 120.\u00a0<\/p>\n

Let\u2019s make that program using a for loop, so do as follows:<\/p>\n

    \n
  1. Create two variables, x which will be the user input and another one called factorial which equals to 1.\u00a0<\/li>\n
  2. Ask the user for the variable.<\/li>\n
  3. Make the for loop. The for loop has to have the four parts in order to be complete. Initialize your variable a<\/b> in 1, then condition it with a less or equal to the user input (this is where the loop will know when to stop), mark the increment, and write the statement, which is factorial equals to factorial multiplied by a.<\/b><\/li>\n
  4. Print the result.<\/li>\n<\/ol>\n

    Your code should look something like this:<\/p>\n

    <\/figure>\n

    Now lets test the program with factorial 5, which should be equal to 120.<\/p>\n

    <\/figure>\n

    That\u2019s it, you now know how to use a for loop, congrats!<\/p>\n","protected":false},"excerpt":{"rendered":"

    On this mastery I will show you what a FOR loop in C++ is and how to use it.<\/p>\n

    A FOR loop is a type of loop which allows you to give specific conditions to it, and then repeat when this conditions are true. 
    A for loop consists of four parts: an initializer (declaration of what happens first to the variable; it only happens once), a condition (evaluates and proceeds with the code if its true, if not it will stop), an incremet (this updates the variable after the code is completed and increments the variable), and the statement (what will happen when the conditions are true). In a flow chart, for loops look something like this:<\/p>\n

    <\/figure>\n

    Now, let’s create a program which displays the factorial of a given number. Factorial is the result of the multiplication of all numbers starting from 1 to the number you want to know its factorial. For example, 5 factorial is 1 x 2 x 3 x 4 x 5 which = 120. <\/p>\n

    Let’s make that program using a for loop, so do as follows:<\/p>\n

      \n
    1. Create two variables, x which will be the user input and another one called factorial which equals to 1. <\/li>\n
    2. Ask the user for the variable.<\/li>\n
    3. Make the for loop. The for loop has to have the four parts in order to be complete. Initialize your variable a<\/b> in 1, then condition it with a less or equal to the user input (this is where the loop will know when to stop), mark the increment, and write the statement, which is factorial equals to factorial multiplied by a.<\/b><\/li>\n
    4. Print the result.<\/li>\n<\/ol>\n

      Your code should look something like this:<\/p>\n

      <\/figure>\n

      Now lets test the program with factorial 5, which should be equal to 120.<\/p>\n

      <\/figure>\n

      That’s it, you now know how to use a for loop, congrats!<\/p>\n","protected":false},"author":230,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[219,171,40,611],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/25208"}],"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\/230"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=25208"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/25208\/revisions"}],"predecessor-version":[{"id":25209,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/25208\/revisions\/25209"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=25208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=25208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=25208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}