If you have any queries, Please ask our experts and Share your precious feedback in the comments, Learn from experts with our Online training Program, visit our website: goo.gl/hNPwDi ,Do not forget to subscribe and hit the bell icon for Future Tutorials updates.
public static void main(String[]args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); if(a%2!=0) { System.out.println("Hello"); } else if(a
import java.util.Scanner; public class PC3 { public static void main(String[] args) { Scanner input=new Scanner(System.in); int x=input.nextInt(); if(x%2==0) { if(x>=0 || x=10 || x
import java.util.Scanner; class check {public static void main(String [] args){ int n; Scanner sc = new Scanner(System.in); System.out.println("ENTER NUMBER "); n = sc.nextInt(); if (n%2 == 0) { if (n>=0 && n 10 && n
package p1; import java.util.*; import java.util.Scanner; public class Challange3 { public static void main(String[] args) { Scanner s = new Scanner(System.in); try(s;){ try { System.out.println("Enter the int value:"); int x = s.nextInt(); if(x%2!=0) { System.out.println("Hello"); }if(x%2==0) { if(x>=0&&x10&&x20){ System.out.println("Bye"); } } }catch(InputMismatchException ime) { System.out.println("Invalid input..."); } }// end of try with resources
package pack5; import java.util.Scanner; public class ClassE { Scanner sc=new Scanner(System.in); public void meth1() { System.out.println("please enter the number:"); int x=sc.nextInt(); if(x%2==0) { System.out.println("This is a even number"); if(x
import java.util.Scanner; public class Challenge03 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("Enter a positive number:"); int x=sc.nextInt(); if(x>0){ if(x%2==0){ System.out.println("Even number"); if(x>0&&x10&&x20){ System.out.println("Bye"); } } else{ System.out.println("hello"); System.out.println("odd number"); } } else{ System.out.println("please enter a value greater than 0 to enter into test cases"); } } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s1=new Scanner(System.in); int x=s1.nextInt(); if(x%2==0) { System.out.println("Number is even"); if(x=10 && x
import java.util.Scanner; class Check { public static void main(String[] args) { System.out.println("Enter a number:"); Scanner sc = new Scanner(System.in); int number = sc.nextInt(); sc.close(); if (number % 2 == 0) { // Check if number is even if (number == 0 || number
sir, above 20(in last logic ) i m getting issue so plz hint me : thank you import java.util.Scanner; public class chn3 { public static void main(String[] args) {
System.out.println("enter the number"); Scanner sc=new Scanner(System.in); int n= sc.nextInt();
if(n%2==0) {
//{System.out.println("odd hellow ");} if (n10 && n
package challenge3; import java.util.Scanner; public class NestedIFExample { public static void main(String[] args) { // TODO Auto-generated method stub
System.out.println("Enter any Number");
Scanner scnr = new Scanner(System.in); int num = scnr.nextInt(); if (num % 2 == 0) {
if(num 10 & num 20) { System.out.println("Bye"); } }
import java.util.Scanner; public class IfExample { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("Enter an integer value..."); int a = s.nextInt(); if(a%2!=0) { System.out.println("It is Odd number..."); } else { if((a>=0)&&(a10)&&(a
import java.util.Scanner; public class v { public static void main(String []args) { Scanner sc=new Scanner(System.in); System.out.println("enter one integer number"); int x=sc.nextInt(); if(x%2==0) { if(x
import java.util.Scanner; class Hel { public static void main(String[] args) { Scanner s=new Scanner(System.in); int n=s.nextInt(); if (n%2!=0){ System.out.println("hello"); } else if (n%2==0 && (n>0 && n10 && n
import java.util.Scanner; class Test { public static void main (String[] args) { Scanner sc = new Scanner(System.in); System.out.println("ENTER NUMBER TO CHECK"); int n = sc.nextInt(); if(n % 2 == 0) { if(n >= 0 && n = 10 && n = 20) { System.out.println("Bye"); } } else { System.out.println("Hello"); } } }
import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if (n % 2 == 0) { System.out.println("Number is even");
if (n > 0 && n < 10) { System.out.println("Hi"); } else if (n >= 10 && n < 20) { System.out.println("Hello"); } else if (n >= 20) { System.out.println("Bye"); } } else { System.out.println("Number is odd"); } } }
If you have any queries, Please ask our experts and Share your precious feedback in the comments, Learn from experts with our Online training Program, visit our website: goo.gl/hNPwDi ,Do not forget to subscribe and hit the bell icon for Future Tutorials updates.
import java.util.Scanner;
public class Challenge3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter an Integer :- ");
int num = sc.nextInt();
if(num % 2 == 0) {
if(num 10 && num 20) {
System.out.println("Bye");
}
}else {
System.out.println("Hello");
}
}
}
Excellent 👌 great
Thank you so much sir
class Example
{
public static void main(String[] args){
int n=20;
if(n%2==0){
if(n>=0&&n10&&n=20){
System.out.println("bye");
}
}
else {
System.out.println("hellow");
}
}
}
public static void main(String[]args)
{
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
if(a%2!=0)
{
System.out.println("Hello");
}
else if(a
package practice;
import java.util.Scanner;
public class C1 {
public static void main(String args[])
{
int x;
Scanner sc = new Scanner(System.in);
x=sc.nextInt();
if(x%2==0)
{
System.out.println("hello");
}
else
{
if(0
import java.util.Scanner;
public class Challenge_03 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("enter a any number ");
int num =sc.nextInt();
if(num%2 != 0)
{
System.out.println("Hello");
}
else
{
if(0 < num && 10 > num)
{
System.out.println("Hii");
}
else if(10 < num && 20 > num)
{
System.out.println("Hello");
}
else
{
System.out.println("Bye");
}
}
}
}
public class ScannerWithNestedIf{
public static void main(String args[]) {
int num;
Scanner scan = new Scanner(System.in);
System.out.println("enter a integer");
num =scan.nextInt();
if((num%2==0)) {
if(num>20) {
System.out.println("Bye" );
}
else if(num10) {
System.out.println("Hello" );
}
else {
System.out.println("Hi" );
}
}
else{
System.out.println("Hellow" );
}
}
}
import java.util.Scanner;
public class Text1 {
public static void main(String[] args) {
Scanner obj = new Scanner(System.in);
System.out.println("enter a number");
int x = obj.nextInt();
if(x % 2==0){
if(x > 0 && x< 10){
System.out.println("hi");
}
else if(x >= 10 && x < 20){
System.out.println("hello");
}
else if(x >= 20){
System.out.println("bye");
}
}
else{
System.out.println("number is odd");
}
}
public class Main
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
if(x % 2 != 0){
System.out.println("Hello");
}else{
if(x >= 0 && x < 10){
System.out.println("Hi");
}
if(x >= 10 && x < 20){
System.out.println("Hello");
}
if(x >= 20){
System.out.println("Bye");
}
}
}
}
public class HelloHi {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
System.out.println("enter the value of x1");
int x= sc.nextInt();
if(x%2==1)
{
System.out.println("Hello");
}
else if(x%2==0)
{
if(x>=0 && x=10 && x20)
{
System.out.println("Bye");
}
}
}
}
import java.util.Scanner;
public class PC3
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
int x=input.nextInt();
if(x%2==0)
{
if(x>=0 || x=10 || x
🤝👏
import java.util.Scanner;
class check
{public static void main(String [] args){
int n;
Scanner sc = new Scanner(System.in);
System.out.println("ENTER NUMBER ");
n = sc.nextInt();
if (n%2 == 0)
{ if (n>=0 && n 10 && n
import java.util.*;
class Sample{
public static void main(String s[]){
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
if(x%2==1){
System.out.println("Hello");
}
else {
if(x>0 && x10 && x
package p1;
import java.util.*;
import java.util.Scanner;
public class Challange3 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
try(s;){
try {
System.out.println("Enter the int value:");
int x = s.nextInt();
if(x%2!=0) {
System.out.println("Hello");
}if(x%2==0) {
if(x>=0&&x10&&x20){
System.out.println("Bye");
}
}
}catch(InputMismatchException ime) {
System.out.println("Invalid input...");
}
}// end of try with resources
}
}
import java.util.Scanner;
class Challenge3 {
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int n=scn.nextInt();
if(n%2!=0){
System.out.println("Hello");
}
else{
if(n>=0 && n10 && n20)
System.out.println("Bye");
}
}
}
}
}
import java.util.Scanner;
public class Cge3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
if(x % 2 != 0) {
System.out.println("Hello");
}
else if(x % 2 == 0) {
if(x>=0 && x=10 && x
import java.util.Scanner;
public class Test{
public static void main(String [] args)
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter a Number :");
int num=sc.nextInt();
if(num % 2==0)
{
if(num>0 && num10 && num20)
{
System.out.println("Bye");
}
}
else
{
System.out.println("Hello");
}
}
}
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner scn=new Scanner(System.in);
System.out.println("give a integer number");
int no=scn.nextInt();
if(no%2!=0){
System.out.println("Hello");
}
else{
if(no>0 && no10 &&no20){
System.out.println("Bye");
}
}
}
}
import java.util.Scanner;
public class IfClass
{
public static void main(Stirng args[])
{
Scanner Scan=new Scanner(System.in);
int Number= Scan.nextInt();
if(Number%2!=0)
{
System.out.println("Hello");
}
else
{
if(Number>=0&&Number
import java.util.Scanner;
public class Challange3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x= sc.nextInt();
if(x%2 == 0)
{
System.out.println("Even");
if( x>20)
System.out.println("Even - bye");
else if(x>10 && x0 && x
If the number is odd and greater than 20 then what will be the out put
Hello and bye
package pack5;
import java.util.Scanner;
public class ClassE
{
Scanner sc=new Scanner(System.in);
public void meth1()
{
System.out.println("please enter the number:");
int x=sc.nextInt();
if(x%2==0)
{
System.out.println("This is a even number");
if(x
import java.util.Scanner;
public class Challenge03
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter a positive number:");
int x=sc.nextInt();
if(x>0){
if(x%2==0){
System.out.println("Even number");
if(x>0&&x10&&x20){
System.out.println("Bye");
}
}
else{
System.out.println("hello");
System.out.println("odd number");
}
}
else{
System.out.println("please enter a value greater than 0 to enter into test cases");
}
}
}
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner s1=new Scanner(System.in);
int x=s1.nextInt();
if(x%2==0)
{
System.out.println("Number is even");
if(x=10 && x
import java.util.Scanner;
class Check {
public static void main(String[] args) {
System.out.println("Enter a number:");
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
sc.close();
if (number % 2 == 0) { // Check if number is even
if (number == 0 || number
give code explanation on core java so that it is easy for us to solve program in java for beginner we dont want faq in core java
package codechef;
import java.util.Scanner;
public class corejavac1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
//System.out.println("Hi
Hello
Bye");
int num;
System.out.println("Enter a num:");
Scanner sc=new Scanner(System.in);
num=sc.nextInt();
if(num%2==0)
{
if(num>=0&&num10&&num
challenge-3
import java.util.Scanner;
class Text{
public static void main(String arg[]){
System.out.println("Enter any Number :");
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
if(n%2==1){
System.out.println("Hello");
}
if(n%2==0){
if(n>1 && n10 && n20){
System.out.println("Bye");
}
}
}
sir, above 20(in last logic ) i m getting issue so plz hint me : thank you
import java.util.Scanner;
public class chn3
{
public static void main(String[] args)
{
System.out.println("enter the number");
Scanner sc=new Scanner(System.in);
int n= sc.nextInt();
if(n%2==0)
{
//{System.out.println("odd hellow ");}
if (n10 && n
package challenge3;
import java.util.Scanner;
public class NestedIFExample {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Enter any Number");
Scanner scnr = new Scanner(System.in);
int num = scnr.nextInt();
if (num % 2 == 0) {
if(num 10 & num 20) {
System.out.println("Bye");
}
}
else {
System.out.println("Hello");
}
}
}
import java.util.Scanner;
public class IfExample
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
System.out.println("Enter an integer value...");
int a = s.nextInt();
if(a%2!=0)
{
System.out.println("It is Odd number...");
}
else
{
if((a>=0)&&(a10)&&(a
import java.util.Scanner;
public class v
{
public static void main(String []args)
{
Scanner sc=new Scanner(System.in);
System.out.println("enter one integer number");
int x=sc.nextInt();
if(x%2==0)
{
if(x
import java.util.*;
class Challang3{
public static void main(String [] ar){
System.out.println("Enter two number");
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
if(x>0){
if(x%2==0){
System.out.println("odd");
if(x>0&&x10&&x20){
System.out.println("bye");
}
}
else{
System.out.println("Hello");
System.out.println("odd number");
}
}
else{
System.out.println("plese enter greater than 0");
}
}
}
import java.util.Scanner;
class Hel {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
if (n%2!=0){
System.out.println("hello");
}
else if (n%2==0 && (n>0 && n10 && n
import java.util.Scanner;
class Test {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("ENTER NUMBER TO CHECK");
int n = sc.nextInt();
if(n % 2 == 0) {
if(n >= 0 && n = 10 && n = 20) {
System.out.println("Bye");
}
} else {
System.out.println("Hello");
}
}
}
import java.util.Scanner;
class Test{
Public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
if(x%2!=0){
System.out.println("Hello");
}
else{
if(x>=0 && x10 && x20){
System.out.println("Bye");
}
}
}
}
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
if (n % 2 == 0) {
System.out.println("Number is even");
if (n > 0 && n < 10) {
System.out.println("Hi");
} else if (n >= 10 && n < 20) {
System.out.println("Hello");
} else if (n >= 20) {
System.out.println("Bye");
}
} else {
System.out.println("Number is odd");
}
}
}