How to fix the error?
package com.codegym.task.task06.task0606;
import java.io.*;
import java.util.Scanner;
public class Solution {
public static int even;
public static int odd;
public static void main(String[] args)throws Exception {
Scanner in=new Scanner(System.in);
int number = in.nextInt();
if (number < 0) number *= -1;
while( number > 1 ){
if (number %2 == 0) {
even++;
number /= 10;
}
else{
odd++;
number /= 10;
}
}
System.out.println("Even: "+even+"Odd: "+odd);
}
}
error
The displayed text must match the task conditions.
package com.codegym.task.task06.task0606;
import java.io.*;
import java.util.Scanner;
public class Solution {
public static int even;
public static int odd;
public static void main(String[] args)throws Exception {
Scanner in=new Scanner(System.in);
int number = in.nextInt();
if (number < 0) number *= -1;
while( number > 1 ){
if (number %2 == 0) {
even++;
number /= 10;
}
else{
odd++;
number /= 10;
}
}
System.out.println("Even: "+even+"Odd: "+odd);
}
}