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 1930

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 1930

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 1930

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 1930

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 1930

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 1930

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 1930

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 1930
{"id":23355,"date":"2015-10-20T22:33:48","date_gmt":"2015-10-21T03:33:48","guid":{"rendered":"https:\/\/everibarra101programming.withknown.com\/2015\/quiz08"},"modified":"2015-10-20T22:33:48","modified_gmt":"2015-10-21T03:33:48","slug":"quiz08-6","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/quiz08-6\/","title":{"rendered":"#Quiz08"},"content":{"rendered":"
\n

This was a difficult quiz for me, at first I didn\u00b4t know how to use arrays so I decide to use vectors, in the end..IT WORKS!!!!<\/p>\n

<\/p>\n

\n
#include<\/a> <iostream><\/span>
#include<\/a> <vector><\/span>
using<\/span> namespace<\/span> std;

void<\/span> newline<\/span>(){
\u00a0 cout<<<\/span>endl;
}

double<\/span> sumsquares_list<\/span> (vector<<\/span>double<\/span>><\/span> vector){
\u00a0 double<\/span> a =<\/span> vector.size();
\u00a0 double<\/span> sum=<\/span>0<\/span>;
\u00a0 for<\/span>(double<\/span> i=<\/span>0<\/span>; i<<\/span>a; i++<\/span>){
\u00a0\u00a0\u00a0 sum=<\/span>sum+<\/span>(vector[i]*<\/span>vector[i]);
\u00a0 }
\u00a0 return<\/span> sum;
}

int<\/span> main<\/span> (){
\u00a0 double<\/span> x;
\u00a0 vector<<\/span>double<\/span>><\/span>vector (0<\/span>, 4<\/span>); \/\/You assign a size for your vector.<\/span>
\u00a0 cout<<<\/span>"Hi, I\u00b4m a calculator of the addition of squares of the numbers you\u00b4ll give me "<\/span><<<\/span>endl;
\u00a0 newline();
\u00a0 cout<<<\/span>"introduce the number (to stop introducing numbers write-->-42)"<\/span><<<\/span>endl;
\u00a0 newline();
\u00a0 cin>><\/span>x;
\u00a0 newline();
\u00a0 while<\/span>(x!=-<\/span>42<\/span>){
\u00a0\u00a0\u00a0 newline();
\u00a0\u00a0\u00a0 cout<<<\/span>"introduce the next number "<\/span><<<\/span>endl;
\u00a0\u00a0\u00a0 newline();
\u00a0 vector.push_back(x); \/\/You\u00b4re increasing the size of the vector<\/span>
\u00a0 cin>><\/span>x;
\u00a0 }
\u00a0 cout<<<\/span>"The result equals to "<\/span><<<\/span>sumsquares_list(vector)<<<\/span>endl;
\u00a0 return<\/span> 0<\/span>;
}
<\/pre>\n<\/div>\n

\u00a0Here\u00b4s my code<\/p>\n

https:\/<\/wbr>\/<\/wbr>github.com\/<\/wbr>everibarra\/<\/wbr>TC101-C-\/<\/wbr>blob\/<\/wbr>master\/<\/wbr>Q8.cpp<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

\n

This was a difficult quiz for me, at first I didn´t know how to use arrays so I decide to use vectors, in the end..IT WORKS!!!!<\/p>\n

<\/p>\n

\n
#include<\/a> <iostream><\/span>
#include<\/a> <vector><\/span>
using<\/span> namespace<\/span> std;

void<\/span> newline<\/span>(){
  cout<<<\/span>endl;
}

double<\/span> sumsquares_list<\/span> (vector<<\/span>double<\/span>><\/span> vector){
  double<\/span> a =<\/span> vector.size();
  double<\/span> sum=<\/span>0<\/span>;
  for<\/span>(double<\/span> i=<\/span>0<\/span>; i<<\/span>a; i++<\/span>){
    sum=<\/span>sum+<\/span>(vector[i]*<\/span>vector[i]);
  }
  return<\/span> sum;
}

int<\/span> main<\/span> (){
  double<\/span> x;
  vector<<\/span>double<\/span>><\/span>vector (0<\/span>, 4<\/span>); \/\/You assign a size for your vector.<\/span>
  cout<<<\/span>\"Hi, I´m a calculator of the addition of squares of the numbers you´ll give me \"<\/span><<<\/span>endl;
  newline();
  cout<<<\/span>\"introduce the number (to stop introducing numbers write-->-42)\"<\/span><<<\/span>endl;
  newline();
  cin>><\/span>x;
  newline();
  while<\/span>(x!=-<\/span>42<\/span>){
    newline();
    cout<<<\/span>\"introduce the next number \"<\/span><<<\/span>endl;
    newline();
  vector.push_back(x); \/\/You´re increasing the size of the vector<\/span>
  cin>><\/span>x;
  }
  cout<<<\/span>\"The result equals to \"<\/span><<<\/span>sumsquares_list(vector)<<<\/span>endl;
  return<\/span> 0<\/span>;
}
<\/pre>\n<\/div>\n

 Here´s my code<\/p>\n

https:\/\/github.com\/everibarra\/TC101-C-\/blob\/master\/Q8.cpp<\/a><\/p>\n<\/div>\n","protected":false},"author":262,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[499,606,519,144,605,604,638,607,147,95],"class_list":["post-23355","post","type-post","status-publish","format-standard","hentry","category-blogs","category-syndicated","tag-0000dd","tag-0066bb","tag-519","tag-144","tag-605","tag-604","tag-638","tag-fff0f0","tag-ffffff","tag-include"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/23355","targetHints":{"allow":["GET"]}}],"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\/262"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=23355"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/23355\/revisions"}],"predecessor-version":[{"id":23357,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/23355\/revisions\/23357"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=23355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=23355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=23355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}