{"id":35,"date":"2010-10-28T21:51:41","date_gmt":"2010-10-28T20:51:41","guid":{"rendered":"https:\/\/www.avventuriero.it\/?p=35"},"modified":"2010-10-29T14:47:23","modified_gmt":"2010-10-29T13:47:23","slug":"maxvalue","status":"publish","type":"post","link":"https:\/\/www.avventuriero.it\/?p=35","title":{"rendered":"MaxValue"},"content":{"rendered":"<p>#include &lt;stdio.h&gt;<\/p>\n<p>\/*<br \/>\nAcquisisce un array di max 20 numeri e stampa il valore massimo.<\/p>\n<p>0 \u00e8 il carattere d\u2019uscita durante l\u2019immissione<br \/>\n*\/<\/p>\n<p><!--more--><\/p>\n<p>void main (){<\/p>\n<p>int seq[20], i, n, max;<\/p>\n<p>printf(&#8220;Inserisci la sequenza di numeri 0 per uscire&#8221;);<br \/>\ni = 0;<\/p>\n<p>do {<br \/>\nscanf(&#8220;%d&#8221;, &amp;seq[i]);<br \/>\ni++;<br \/>\n} while (i &lt; 20 &amp;&amp; (seq[i-1]!=0));<\/p>\n<p>max = 0;<\/p>\n<p>for (i=0; i&lt;20 &amp;&amp; (seq[i]!=0); i++){<br \/>\n\/\/ stampa di controllo<br \/>\nprintf(&#8220;%d &#8211; %d \\n&#8221;, max, seq[i]);<br \/>\n\/\/ fine stampa di controllo<br \/>\nif (seq[i]&gt; max)<br \/>\nmax = seq[i];<br \/>\n}<\/p>\n<p>printf (&#8220;il max \u00e8 %d&#8221;, max);<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#include &lt;stdio.h&gt; \/* Acquisisce un array di max 20 numeri e stampa il valore massimo. 0 \u00e8 il carattere d\u2019uscita durante l\u2019immissione *\/<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-c-trial","category-infolearn"],"_links":{"self":[{"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":5,"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions\/46"}],"wp:attachment":[{"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.avventuriero.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}