{"id":1374,"date":"2022-03-03T19:06:25","date_gmt":"2022-03-03T19:06:25","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=1374"},"modified":"2022-03-03T19:06:25","modified_gmt":"2022-03-03T19:06:25","slug":"program-to-check-even-or-odd-number","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/03\/03\/program-to-check-even-or-odd-number\/","title":{"rendered":"Program to check Even or Odd number"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>import java.util.Scanner;\n\nclass CheckEvenOdd\n{\n  public static void main(String args&#91;])\n  {\n    int num;\n    System.out.println(\"Enter an Integer number:\");\n\n    \/\/The input provided by user is stored in num\n    Scanner input = new Scanner(System.in);\n    num = input.nextInt();\n\n    \/* If number is divisible by 2 then it's an even number\n     * else odd number*\/\n    if ( num % 2 == 0 )\n        System.out.println(\"Entered number is even\");\n     else\n        System.out.println(\"Entered number is odd\");\n  }\n}<\/code><\/pre>\n\n\n\n<p>Output 1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter an Integer number:\n78\nEntered number is even<\/code><\/pre>\n\n\n\n<p>Output 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter an Integer number:\n77\nEntered number is odd<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Output 1: Output 2:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[260],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/1374"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=1374"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/1374\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=1374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=1374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=1374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}