{"id":2515,"date":"2019-09-25T12:39:41","date_gmt":"2019-09-25T10:39:41","guid":{"rendered":"http:\/\/www.webotlet.hu\/?p=2515"},"modified":"2019-09-25T12:47:26","modified_gmt":"2019-09-25T10:47:26","slug":"a-tombok-alapjai-16-feladat-megoldasa","status":"publish","type":"post","link":"https:\/\/www.webotlet.hu\/?p=2515","title":{"rendered":"A T\u00f6mb\u00f6k alapjai 16. feladat megold\u00e1sa"},"content":{"rendered":"<h3><strong>Csak akkor olvass tov\u00e1bb, ha a <a href=\"http:\/\/www.webotlet.hu\/?p=993\">T\u00f6mb\u00f6k alapjai 16.<\/a> feladatot megoldottad, vagy nem siker\u00fclt megoldani.<\/strong><\/h3>\n<p>A feladat le\u00edr\u00e1s\u00e1t a fenti linken megtal\u00e1lod.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n\/**\r\n *\r\n * @author https:\/\/webotlet.hu\r\n *\/\r\n\r\npackage webotlet_tombok16;\r\n\r\npublic class Webotlet_Tombok16\r\n{\r\n\r\n  public static void main(String&#x5B;] args)\r\n  {\r\n\/\/    T\u00f6lts fel egy 10 elem\u0171 t\u00f6mb\u00f6t a &#x5B;-30;100]\r\n\/\/    intervallumb\u00f3l sorsolt p\u00e1ratlan sz\u00e1mokkal!\r\n    int&#x5B;] tomb = new int&#x5B;10];\r\n    \r\n    int cel = 0; \/\/ ennyi sz\u00e1m van m\u00e1r meg\r\n    int idx = 0; \/\/ a k\u00f6vetkez\u0151 \u00fcres hely a t\u00f6mbben\r\n    while( cel != 10 )\r\n    {\r\n      int szam = (int)(Math.random()*131)-30;\r\n      if( szam % 2 != 0 )\r\n      {\r\n        tomb&#x5B;idx] = szam;\r\n        idx++;\r\n        cel++;\r\n      }\r\n    }\r\n    \r\n    for( int i = 0; i &lt; tomb.length; i++ )\r\n    {\r\n      System.out.print(tomb&#x5B;i]+&quot; &quot;);\r\n    }\r\n    System.out.println();\r\n  }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Csak akkor olvass tov\u00e1bb, ha a T\u00f6mb\u00f6k alapjai 16. feladatot megoldottad, vagy nem siker\u00fclt megoldani. A feladat le\u00edr\u00e1s\u00e1t a fenti linken megtal\u00e1lod. \/** * * @author https:\/\/webotlet.hu *\/ package webotlet_tombok16; public class Webotlet_Tombok16 { public static void main(String&#x5B;] args) { <a class=\"more-link\" href=\"https:\/\/www.webotlet.hu\/?p=2515\">Tov\u00e1bb <span class=\"screen-reader-text\">  A T\u00f6mb\u00f6k alapjai 16. feladat megold\u00e1sa<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[213],"tags":[31,47,144,143,183,15,163,67],"class_list":["post-2515","post","type-post","status-publish","format-standard","hentry","category-tombok-alapjai-megoldasok","tag-ciklus","tag-ciklusok","tag-java_programozas","tag-programozas","tag-programozas-feladat","tag-tomb","tag-tombok","tag-while"],"_links":{"self":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts\/2515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2515"}],"version-history":[{"count":4,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts\/2515\/revisions"}],"predecessor-version":[{"id":2517,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=\/wp\/v2\/posts\/2515\/revisions\/2517"}],"wp:attachment":[{"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webotlet.hu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}