Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":7890,"date":"2015-03-15T21:00:28","date_gmt":"2015-03-16T03:00:28","guid":{"rendered":"https:\/\/carlosgreenprograms.withknown.com\/2015\/wsq10"},"modified":"2015-03-15T21:00:28","modified_gmt":"2015-03-16T03:00:28","slug":"wsq10-6","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/wsq10-6\/","title":{"rendered":"WSQ10"},"content":{"rendered":"
\n

#WSQ10<\/a><\/p>\n

This program is created using arrays in order to store a maximum of numbers entered by the user.<\/p>\n

After that, the stored numbers can be used to create a sum of them and the average of them as well. This works because we created a function that stored 5 numbers (array [5]) in order to be able to ask the user for 5 numbers to be stored.<\/p>\n

here is the code with notes to be better understanded:<\/p>\n

#include<\/a> <iostream><\/p>\n

using namespace std;<\/p>\n

 <\/p>\n

int main(){<\/p>\n

int array [5]; \/\/declaring the array with a maximum of 5 values<\/p>\n

 <\/p>\n

for (int i=0; i<5; i++){ \/\/the first loop will sotre the values from 0 to 4 (including 0)<\/p>\n

  cout << “please give us a number: “;<\/p>\n

  cin >> array [i]; \/\/ the program will read the values that the user enters until value # 4<\/p>\n

 <\/p>\n

}<\/p>\n

for (int i=0; i<5; i++){ \/\/ the program will show the values that the user entered<\/p>\n

  cout << array [ i ]<<endl;<\/p>\n

}<\/p>\n

int sum = 0;\/\/fisrt variable to sum the values from the array<\/p>\n

int average,sum1;<\/p>\n

for (int i = 0; i < 5; ++i)\/\/ this loop will give the program all the values from the array in order to sum them<\/p>\n

  sum+=array[i];\/\/ sums the values given by the array<\/p>\n

average = sum\/5; \/\/gets average<\/p>\n

cout<<” Average:”<<average;<\/p>\n

 <\/p>\n

 <\/p>\n

return 0;<\/p>\n

}<\/p>\n

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

#WSQ10This program is created using arrays in order to store a maximum of numbers entered by the user.After that, the stored numbers can be used to create a sum of them and the average of them as well. This works because we created a function … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,26],"tags":[95,88],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/7890"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=7890"}],"version-history":[{"count":6,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/7890\/revisions"}],"predecessor-version":[{"id":19578,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/7890\/revisions\/19578"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=7890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=7890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=7890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}