{"id":1499,"date":"2015-01-19T10:47:15","date_gmt":"2015-01-19T09:47:15","guid":{"rendered":"http:\/\/liceocuneo.it\/oddenino\/?p=1499"},"modified":"2015-01-20T23:57:27","modified_gmt":"2015-01-20T22:57:27","slug":"potenze-jsp","status":"publish","type":"post","link":"https:\/\/liceocuneo.it\/oddenino\/potenze-jsp\/","title":{"rendered":"potenze.jsp"},"content":{"rendered":"<pre>&lt;%@page contentType=\"text\/html\" pageEncoding=\"UTF-8\"%&gt;\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n &lt;head&gt;\r\n &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\"&gt;\r\n &lt;title&gt;Potenze - Gianfranco Oddenino&lt;\/title&gt;\r\n &lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"stile.css\"&gt;\r\n &lt;\/head&gt;\r\n &lt;body&gt;\r\n &lt;%@ include file=\"WEB-INF\/jspf\/header.jspf\"%&gt;\r\n &lt;%@ include file=\"WEB-INF\/jspf\/menu.jspf\"%&gt;\r\n &lt;div id=\"content\"&gt;\r\n &lt;h2&gt;Potenze&lt;\/h2&gt;\r\n &lt;form action=\"potenze.jsp\" method=\"get\"&gt;\r\n Inserisci un numero &lt;input type=\"text\" name=\"n\"\/&gt;&lt;br\/&gt;\r\n Seleziona l'operazione\r\n &lt;select name=\"op\"&gt;\r\n &lt;option value=\"2\"&gt;Quadrato&lt;\/option&gt;\r\n &lt;option value=\"3\"&gt;Cubo&lt;\/option&gt;\r\n &lt;option value=\"4\"&gt;Radice quadrata&lt;\/option&gt;\r\n &lt;\/select&gt;&lt;br\/&gt;\r\n &lt;input type=\"reset\" value=\"Cancella\" \/&gt;\r\n &lt;input type=\"submit\" value=\"Calcola\" \/&gt;\r\n &lt;\/form&gt;\r\n &lt;% String valore = request.getParameter(\"n\");\r\n if (valore != null) {\r\n int n = Integer.parseInt(valore);\r\n %&gt;\r\n &lt;p&gt;n = &lt;%=n%&gt;&lt;br \/&gt;\r\n &lt;% int op = Integer.parseInt(request.getParameter(\"op\"));\r\n switch (op) {\r\n case 2: %&gt;n\u00b2 = &lt;%=n * n %&gt;&lt;% break;\r\n case 3: %&gt;n\u00b3 = &lt;%=n * n * n %&gt;&lt;% break;\r\n case 4: %&gt;n\u00bd = &lt;%=Math.sqrt(n)%&gt;&lt;% break;\r\n }\r\n }\r\n %&gt;\r\n &lt;\/p&gt;\r\n &lt;\/div&gt;\r\n &lt;%@ include file=\"WEB-INF\/jspf\/footer.jspf\"%&gt;\r\n &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;%@page contentType=&#8221;text\/html&#8221; pageEncoding=&#8221;UTF-8&#8243;%&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=UTF-8&#8243;&gt; &lt;title&gt;Potenze &#8211; Gianfranco Oddenino&lt;\/title&gt; &lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; href=&#8221;stile.css&#8221;&gt; &lt;\/head&gt; &lt;body&gt; &lt;%@ include file=&#8221;WEB-INF\/jspf\/header.jspf&#8221;%&gt; &lt;%@ include file=&#8221;WEB-INF\/jspf\/menu.jspf&#8221;%&gt; &lt;div id=&#8221;content&#8221;&gt; &lt;h2&gt;Potenze&lt;\/h2&gt; &lt;form action=&#8221;potenze.jsp&#8221; method=&#8221;get&#8221;&gt; Inserisci un numero &lt;input type=&#8221;text&#8221; name=&#8221;n&#8221;\/&gt;&lt;br\/&gt; Seleziona l&#8217;operazione &lt;select name=&#8221;op&#8221;&gt; &lt;option value=&#8221;2&#8243;&gt;Quadrato&lt;\/option&gt; &lt;option value=&#8221;3&#8243;&gt;Cubo&lt;\/option&gt; &lt;option value=&#8221;4&#8243;&gt;Radice quadrata&lt;\/option&gt; &lt;\/select&gt;&lt;br\/&gt; &lt;input type=&#8221;reset&#8221; value=&#8221;Cancella&#8221; \/&gt; &hellip; <a href=\"https:\/\/liceocuneo.it\/oddenino\/potenze-jsp\/\" class=\"more-link\">Continua a leggere <span class=\"screen-reader-text\">potenze.jsp<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1499","post","type-post","status-publish","format-standard","hentry","category-informatica"],"_links":{"self":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts\/1499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/comments?post=1499"}],"version-history":[{"count":0,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts\/1499\/revisions"}],"wp:attachment":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/media?parent=1499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/categories?post=1499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/tags?post=1499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}