{"id":32130,"date":"2016-02-17T19:11:51","date_gmt":"2016-02-18T01:11:51","guid":{"rendered":"http:\/\/everolivares.wordpress.com\/?p=184"},"modified":"2016-02-17T19:59:44","modified_gmt":"2016-02-18T01:59:44","slug":"quiz-1-11","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/02\/quiz-1-11\/","title":{"rendered":"QUIZ 1"},"content":{"rendered":"<p>Quiz 1 was divided in three programs&#8230; the first one is able to determine the volume of a cylinder&#8230; the second one is able to calculate some basic operations (without using functions)&#8230; and the third one is basically similar to the second one but with more basic operations.<\/p>\n<p>\/\/CODE 1:<\/p>\n<p>#include &lt;iostream&gt;<br \/>\nusing namespace std;<\/p>\n<p>int main(int argc, char const *argv[]) {<br \/>\nfloat radius, height, volume;<\/p>\n<p>std::cout &lt;&lt; &#8220;This program can determine the volume of a cylinder.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;Please enter the value of the radius of the cylinder.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; radius;<br \/>\nstd::cout &lt;&lt; &#8220;Please enter the height of the cylinder.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; height;<br \/>\nvolume=(3.1415*(radius*radius)*height);<br \/>\nstd::cout &lt;&lt; &#8220;The volume of the cylinder is &#8220;&lt;&lt;volume &lt;&lt; std::endl;<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-191\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/a8aeede851bdc0ea6b7b1f6f8f4e6866.jpg\" alt=\"Captura de pantalla 2016-02-17 a las 19.09.49\"   \/><\/p>\n<p>\/\/CODE 2:<\/p>\n<p>#include &lt;iostream&gt;<br \/>\nusing namespace std;<\/p>\n<p>int main(int argc, char const *argv[]) {<br \/>\nint n1, n2, r1, r2, r3;<br \/>\nstd::cout &lt;&lt; &#8220;This program can determine the product, integer division and the remainder of two random numbers.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;Please enter the first number.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; n1;<br \/>\nstd::cout &lt;&lt; &#8220;Please enter the second number.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; n2;<br \/>\nr1=n1*n2;<br \/>\nr2=n1\/n2;<br \/>\nr3=n1%n2;<br \/>\nstd::cout &lt;&lt; &#8220;The product of the two numbers is&#8230; &#8220;&lt;&lt;r1 &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;The integer division of the two numbers is&#8230; &#8220;&lt;&lt;r2 &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;The remainder of the two numbers is&#8230; &#8220;&lt;&lt;r3 &lt;&lt; std::endl;<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-195\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/e9b1f6c75a5a130efdd29ee923567c92.jpg\" alt=\"Captura de pantalla 2016-02-17 a las 19.10.49\"   \/><\/p>\n<p>\/\/CODE 3:<\/p>\n<p>#include &lt;iostream&gt;<br \/>\nusing namespace std;<\/p>\n<p>int main(int argc, char const *argv[]) {<br \/>\nfloat n1, n2, r1, r2, r3, r4;<br \/>\nstd::cout &lt;&lt; &#8220;This program can determine the product, integer division and the remainder of two random numbers.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;Please enter the first number.&#8221; &lt;&lt; std::endl;<br \/>\nstd::cin &gt;&gt; n1;<br \/>\nstd::cout &lt;&lt; &#8220;Please enter the second number.&#8221; <\/p>\n<div class=\"post-limited-image\"><img decoding=\"async\" class=\"alignnone size-full wp-image-198\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/7ce820b32ab5ddafafa1c688a8ab8a22.jpg\" alt=\"Captura de pantalla 2016-02-17 a las 19.11.32\"   \/><\/div>\n<div class=\"post-limited-image\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/212e214eebef0953d55ac99c80d1bd2e.jpg\" \/><\/div>\n<div class=\"post-limited-image\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/e4778a5f5a120efbec3bd2176d59ee78.jpg#038;blog=105236756&#038;%23038;post=184&#038;%23038;subd=everolivares&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/div>\n<p><!--more--> std::endl;<br \/>\nstd::cin &gt;&gt; n2;<br \/>\nr1=n1+n2;<br \/>\nr2=n1-n2;<br \/>\nr3=n1*n2;<br \/>\nr4=n1\/n2;<br \/>\nstd::cout &lt;&lt; &#8220;The sum of the two numbers is&#8230; &#8220;&lt;&lt;r1 &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;The difference division of the two numbers is&#8230; &#8220;&lt;&lt;r2 &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;The product of the two numbers is&#8230; &#8220;&lt;&lt;r3 &lt;&lt; std::endl;<br \/>\nstd::cout &lt;&lt; &#8220;The division of the two numbers is&#8230; &#8220;&lt;&lt;r4 &lt;&lt; std::endl;<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-198\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/7ce820b32ab5ddafafa1c688a8ab8a22.jpg\" alt=\"Captura de pantalla 2016-02-17 a las 19.11.32\"   \/><\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/everolivares.wordpress.com\/184\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/212e214eebef0953d55ac99c80d1bd2e.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/02\/e4778a5f5a120efbec3bd2176d59ee78.jpg#038;blog=105236756&#038;%23038;post=184&#038;%23038;subd=everolivares&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quiz 1 was divided in three programs&#8230; the first one is able to determine the volume of a cylinder&#8230; the second one is able to calculate some basic operations (without using functions)&#8230; and the third one is basically similar to the second one but with more basic operations. \/\/CODE 1: #include &lt;iostream&gt; using namespace std; &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/02\/quiz-1-11\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">QUIZ 1<\/span><\/a><\/p>\n","protected":false},"author":58,"featured_media":32145,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[182,25],"class_list":["post-32130","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-quizes","tag-uncategorized"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/32130","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\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=32130"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/32130\/revisions"}],"predecessor-version":[{"id":32153,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/32130\/revisions\/32153"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/32145"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=32130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=32130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=32130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}