{"id":38507,"date":"2016-05-14T11:08:19","date_gmt":"2016-05-14T16:08:19","guid":{"rendered":"http:\/\/lilihecblog.wordpress.com\/?p=149"},"modified":"2016-05-15T07:34:07","modified_gmt":"2016-05-15T12:34:07","slug":"quiz-2-24","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/05\/quiz-2-24\/","title":{"rendered":"QUIZ 2"},"content":{"rendered":"<p>El segundo quiz fue separado en solo dos programas, el primero pregunta dos n\u00fameros diferentes al usuario y calcula con funciones el primero numero con el segundo<\/p>\n<p>\/\/CODE 1:<\/p>\n<p># include &lt;iostream&gt;<br \/>\n#include &lt;cmath&gt;<br \/>\nusing namespace std;<\/p>\n<p>int main(int argc, char const *argv[]) {<br \/>\nint num1, num2, R;<br \/>\nstd::cout &lt;&lt; \u201cThis program makes the power function between number 1 and number 2.\u201d &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; \u201cPlease enter number 1\u201d &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; num1;<br \/>\nstd::cout &lt;&lt; \u201cPlease enter number 2\u201d &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; num2;<\/p>\n<p>R=pow (num1, num2);<\/p>\n<p>std::cout &lt;&lt; \u201cThe final result is\u2026 \u201d &lt;&lt;R &lt;&lt; std::endl;<br \/>\nreturn 0;<br \/>\n}<img decoding=\"async\" class=\"alignnone size-full wp-image-151\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/b72466049da5815c872f6708fd5d15bc.jpg\" alt=\"Captura de pantalla 2016-05-14 a las 11.07.07.png\"   \/><\/p>\n<p>Este c\u00f3digo es capaz de imprimir un cierto n\u00famero de estrellas con un valor dado por el usuario . El uso de una funci\u00f3n llamada &#8220;estrellas&#8221; y un bucle .<\/p>\n<p>#include &lt;iostream&gt;<\/p>\n<p>using namespace std;<\/p>\n<p>void stars(int s) {<br \/>\nint count=0;<br \/>\ndo {<br \/>\nstd::cout &lt;&lt; \u201c*\u201d &lt;&lt; std::endl;<br \/>\ncount++;<br \/>\n} while(count!=s);<br \/>\n}<\/p>\n<p>int main(int argc, char const *argv[]) {<br \/>\nint s, count;<\/p>\n<p>std::cout &lt;&lt; \u201cThis program prints the stars you ask for.\u201d &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; \u201cPlease enter the number of stars you want to print in the console.\u201d &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; s;<br \/>\nstars(s);<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/lilihecblog.wordpress.com\/149\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/33251f7ec838d0fc6ff33c9da0920c14.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/46828e26b5ca3bad1abb5d7068e7b31b.jpg#038;blog=105581831&#038;%23038;post=149&#038;%23038;subd=lilihecblog&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>El segundo quiz fue separado en solo dos programas, el primero pregunta dos n\u00fameros diferentes al usuario y calcula con funciones el primero numero con el segundo \/\/CODE 1: # include &lt;iostream&gt; #include &lt;cmath&gt; using namespace std; int main(int argc, char const *argv[]) { int num1, num2, R; std::cout &lt;&lt; \u201cThis program makes the power &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/05\/quiz-2-24\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">QUIZ 2<\/span><\/a><\/p>\n","protected":false},"author":77,"featured_media":38544,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[45],"class_list":["post-38507","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-sin-categoria"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/38507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=38507"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/38507\/revisions"}],"predecessor-version":[{"id":38548,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/38507\/revisions\/38548"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/38544"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=38507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=38507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=38507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}