Hey all. well it works for everything but the negative odd numbers. I've looked over the code a bunch and I don't see the issue. which means its probably staring me in the face. help!
ps don't try this stuff whilst working midnight shift, you'll make errors you miss a lot and feel bad about it later!
update: I found it.
package com.codegym.task.task04.task0426;
/*
Labels and numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int x = Integer.parseInt(reader.readLine());
if ((x>0)&&(x%2==0))
System.out.println("Positive even number");
else if ((x<0)&&(x%2==0)){
System.out.println("Negative even number");
}
else if ((x>0)&&(x%2==1)){
System.out.println("Positive odd number");
}
else if ((x<0)&&(x%2==1)){
System.out.println("Negative odd number");
}
else if (x==0)
System.out.println("Zero");
}
}