So everything seems to be working, but the Requirements are not being met. Wondering if anyone can help with this?
package com.codegym.task.task06.task0606;
import java.io.*;
/*
Even and odd digits
*/
public class Solution {
public static int even;
public static int odd;
public static void main(String[] args) throws IOException {
//write your code here
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int pos = 0;
for (int i=0;i<5;i++)
{
pos = s.charAt(i);
int n = Character.getNumericValue(pos);
//char a = s.charAt(i);
if (n%2==0)
even++;
else
odd++;
}
int a = even;
int b = odd;
System.out.println("Even: "+even+" Odd: "+odd);
}
}