Why when I try to validate it gives me errors on the last 2 conditions? This code is immaculate!!! Couldn't have been written better than The Creator, James Gosling himself... Yet both on IntelliJ and The webpage IDE I get errors on the last 2 conditions. (When the code is ran it meets all the requirements as well)
package com.codegym.task.task04.task0412;
/*
Positive and negative 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 number = Integer.parseInt(reader.readLine());
if (number > 0) {
number = (number * 2);
System.out.println(number);
}
if (number < 0) {
number = (number + 1);
System.out.println(number);
}
if (number == 0) {
System.out.println("Zero");
}
}
}