Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  yus
Language: JAVA
Code:
import java.util.*;
public class HelloWorld{

     public static void main(String []args){
        Scanner sc=new Scanner(System.in);
        String s1=sc.nextLine();
        String s2=sc.nextLine();
        int n=s1.length();
        int m=s2.length();
        
        String s5=s1.substring(0,n/2-1);
        String s6=s2.substring(m/2,m-1);
        String s3=s1.substring(n/2,n-1);
        String s4=s2.substring(0,m/2-1);
        String s7="";
         char a[]= new char[100];
        char b[]=new char[100];
       
        int x=s3.length();
        for (int i = 0; i <x  ; i++)
        {
              a[i] = new Character(s3.charAt(i));
       
        }
        int y=s4.length();
        
        for (int i = 0; i <y; i++)
        {
              b[i] = new Character(s4.charAt(i));
       
        }
         for (int i = 0; i <x ; i++)
        {
            for(int j=0;j<y;j++)
            {
                
                if(a[i]!=b[j])
                {
                  System.out.println(s3);  
                 s7=s5+s6+s3+s4;
                }
            }
        }
        System.out.println(s7.length());
        
     }
}
     
Comments: