{"id":1062,"date":"2025-12-05T16:39:11","date_gmt":"2025-12-05T16:39:11","guid":{"rendered":"https:\/\/javigomez.org\/?p=1062"},"modified":"2025-12-05T16:51:37","modified_gmt":"2025-12-05T16:51:37","slug":"formato-de-visualizacion","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2025\/12\/05\/formato-de-visualizacion\/","title":{"rendered":"Formato de visualizaci\u00f3n"},"content":{"rendered":"\n<p>Pedir un n\u00famero por pantalla y sacar los n n\u00fameros pares con el siguiente formato (si el usuario escribe un 4) 2-4-6-8<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import java.util.Scanner;<br><br>public class Tr03 {<br>    public static void main(String[] args) {<br>       \/*<br>Pedir un n\u00famero por pantalla y sacar los n n\u00fameros pares<br>con el siguiente formato (si el usuario escribe un 4)<br>2-4-6-8<br> *\/<br>        Scanner sc = new Scanner(System.<em>in<\/em>);<br>        System.<em>out<\/em>.print(\"Numero:\");<br>        int num = sc.nextInt();<br>        for (int i = 2; i &lt;= num * 2; i += 2)<br>            if (i == num * 2)<br>                System.<em>out<\/em>.print(i);<br>            else<br>                System.<em>out<\/em>.print(i + \"-\");<br>    }<br>}<\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Visualizaci\u00f3n de n\u00fameros\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/0xKqg24UYVY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Pedir un n\u00famero por pantalla y sacar los n n\u00fameros pares con el siguiente formato (si el usuario escribe un 4) 2-4-6-8 import java.util.Scanner;public class &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[203],"class_list":["post-1062","post","type-post","status-publish","format-standard","hentry","category-java","tag-java"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/comments?post=1062"}],"version-history":[{"count":2,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1062\/revisions"}],"predecessor-version":[{"id":1065,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1062\/revisions\/1065"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=1062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=1062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=1062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}