You are viewing a single comment's thread. Return to all comments →
wts wrong in this code public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.next(); int l= s.length(); int b=l/3; int count=0; int num; for(int i=0;i<b;i++) { num=(int)s.charAt(i); if(s.charAt(i) != s.charAt(i+b)) { count ++; } } System.out.println(count);
Mars Exploration
You are viewing a single comment's thread. Return to all comments →