{"id":69,"date":"2015-07-15T16:06:03","date_gmt":"2015-07-15T13:06:03","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=69"},"modified":"2015-07-20T12:59:14","modified_gmt":"2015-07-20T09:59:14","slug":"max-3number","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=69","title":{"rendered":"Find the maximum of two numbers"},"content":{"rendered":"<p><strong>Task<\/strong>. Were given two real numbers [latex]x[\/latex] and [latex]y[\/latex]. Find [latex]\\max (x, y)[\/latex].<\/p>\n<h1>Tests<\/h1>\n<table border=\"2\">\n<tbody>\n<tr>\n<th>Input<\/th>\n<th>Output<\/th>\n<\/tr>\n<tr>\n<td>758 843<\/td>\n<td>Maximum number is: 843<\/td>\n<\/tr>\n<tr>\n<td>459 238<\/td>\n<td>Maximum number is: 459<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>Solution<\/h1>\n<pre class=\"lang:java decode:true \">import java.util.Scanner;\r\n\r\nclass Main {\r\n\tpublic static void main (String[] args) throws java.lang.Exception {\r\n\t\tScanner s = new Scanner(System.in);\r\n\t\tint x = s.nextInt();\r\n\t\tint y = s.nextInt();\r\n\t\tSystem.out.println(\"Maximum number is: \" + (x &gt; y? x : y));\r\n\t\ts.close();\r\n\t}\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Task. Were given two real numbers [latex]x[\/latex] and [latex]y[\/latex]. Find [latex]\\max (x, y)[\/latex]. Tests Input Output 758 843 Maximum number is: 843 459 238 Maximum number is: 459 Solution import java.util.Scanner; class Main { public static void main (String[] args) throws java.lang.Exception { Scanner s = new Scanner(System.in); int x = s.nextInt(); int y = &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=69\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":93,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[],"jetpack_featured_media_url":"https:\/\/java.mazurok.com\/wp-content\/uploads\/8.jpg","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/69"}],"collection":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69"}],"version-history":[{"count":13,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions\/145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}