Computer Science, asked by joinit678, 5 months ago

write a program in java to check whether a number is positive or negative.if positive,then find whether even or odd.​

Answers

Answered by Saurav8254
0

public class Demo

{

public static void main(String[] args)

{

int number=109;

if(number > 0)

{

System.out.println(number+" is a positive number");

}

else if(number < 0)

{

System.out.println(number+" is a negative number");

}

else

{

System.out.println(number+" is neither positive nor negative");

}

}

}

Similar questions