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":22214,"date":"2015-09-18T16:23:48","date_gmt":"2015-09-18T21:23:48","guid":{"rendered":"http:\/\/opezaimd.tumblr.com\/post\/129372781960"},"modified":"2015-09-18T16:23:48","modified_gmt":"2015-09-18T21:23:48","slug":"masteries-15-16-2","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/masteries-15-16-2\/","title":{"rendered":"Masteries 15 & 16"},"content":{"rendered":"

On these masteries I\u2019m going to show you what are IF and ELSE statements in C++ and how to use them.\u00a0<\/p>\n

If and else are used in C++ when you want something to happen inside your code ONLY when a condition is given.\u00a0<\/p>\n

On a flow chart, IF and ELSE look like this:<\/p>\n

<\/figure>\n

Source and more information<\/b><\/a><\/p>\n

For example, in real life, your mom may tell you:\u00a0\u201cYou are ONLY going to the party IF you score more or equal than 85 on your TC1017 exam. Else, you are not going to the party.\u201d<\/p>\n

For the purpose of this mastery, let\u2019s creat that exact program. We will need an IF and ELSE statement, and some cin and cout commands we learned on mastery 10<\/a>.<\/i><\/b><\/p>\n

Let\u2019s go ahead and create our \u201cbasic program\u201d again.<\/p>\n

<\/figure>\n

Now, let\u2019s grab our real life example. Let\u2019s give the program the same condition your mom gave to you. Do as follows:<\/p>\n

    \n
  1. Create two variables that will work as your score and the permition.<\/li>\n
  2. Write the code were the program asks the user for the score (cin)<\/li>\n
  3. Write the condition.\u00a0<\/li>\n
      \n
    1. IF: the input (your score) is greater or equal than 85, the program will print a message where it says that you are going to the party.<\/li>\n
    2. ELSE,\n

      the program will print a message where it says that<\/p>\n

      you are not going to the party.<\/li>\n<\/ol>\n<\/ol>\n

      <\/figure>\n

      Now let\u2019s test our program. Remeber to change directory, compile and then run.<\/p>\n

      <\/figure>\n

      I tested every possible condition the user could input. Remember that if your program stopped, you can simply run (.\/a.exe) again and the program will work. You don\u2019t need to close the terminal and open it again.\u00a0<\/p>\n

      That\u2019s the basic use of IF…ELSE and now you know how to use it, congrats! \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"

      On these masteries I’m going to show you what are IF and ELSE statements in C++ and how to use them. <\/p>\n

      If and else are used in C++ when you want something to happen inside your code ONLY when a condition is given. <\/p>\n

      On a flow chart, IF and ELSE look like this:<\/p>\n

      <\/figure>\n

      Source and more information<\/b><\/a><\/p>\n

      For example, in real life, your mom may tell you: “You are ONLY going to the party IF you score more or equal than 85 on your TC1017 exam. Else, you are not going to the party.”<\/p>\n

      For the purpose of this mastery, let’s creat that exact program. We will need an IF and ELSE statement, and some cin and cout commands we learned on mastery 10<\/a>.<\/i><\/b><\/p>\n

      Let’s go ahead and create our “basic program” again.<\/p>\n

      <\/figure>\n

      Now, let’s grab our real life example. Let’s give the program the same condition your mom gave to you. Do as follows:<\/p>\n

        \n
      1. Create two variables that will work as your score and the permition.<\/li>\n
      2. Write the code were the program asks the user for the score (cin)<\/li>\n
      3. Write the condition. <\/li>\n
          \n
        1. IF: the input (your score) is greater or equal than 85, the program will print a message where it says that you are going to the party.<\/li>\n
        2. ELSE,\n

          the program will print a message where it says that<\/p>\n

          you are not going to the party.<\/li>\n<\/ol>\n<\/ol>\n

          <\/figure>\n

          Now let’s test our program. Remeber to change directory, compile and then run.<\/p>\n

          <\/figure>\n

          I tested every possible condition the user could input. Remember that if your program stopped, you can simply run (.\/a.exe) again and the program will work. You don’t need to close the terminal and open it again. <\/p>\n

          That’s the basic use of IF…ELSE and now you know how to use it, congrats! \ud83d\ude00<\/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,113,114,40],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/22214"}],"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=22214"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/22214\/revisions"}],"predecessor-version":[{"id":22215,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/22214\/revisions\/22215"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=22214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=22214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=22214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}