All pastes #277701 Raw Edit

Mine

public text v1 · immutable
·published 2006-12-13 14:30 UTC
rendered paste body
public class Lab6_2b{
public static void main (String args[]){
int r=0,i,j,k=0,s=0,l1=0,l2=0,n=0,n2;

String str = new String("Øëà Càøà ïî øîññå ");
String str1 = new String("Êóïèëà ìàñëî Càøà  ");
String str2 = new String();
String str3 = new String();
String str4 = new String();
String str5 = new String();

for (i=0;i<str.length();i++) {
{
    {
if(str.charAt(i)==' ')
s=s+1;
}
}
}
    for (i=0;i<str1.length();i++) {
{
if(str1.charAt(i)==' ') {
k=k+1;                 }
}
}
 String [] pr1=new String[s];
 while (str.indexOf(' ')!=-1){
  l1=str.indexOf(' ');
  str2=str.substring(0,l1);
  pr1[n]=str2;
  str=str.substring(l1+1,str.length());
  n++;
}
String [] pr2=new String[s];
while (str1.indexOf(' ')!=-1){
  l2=str1.indexOf(' ');
  str3=str1.substring(0,l2);
  pr2[r]=str3;
  str1=str1.substring(l2+1,str1.length());
  r++;
}
for (n=0;n<s;n++){
for (r=0;r<k;r++){
//if ((n!=r))
{
if (pr1[n].equals(pr2[r])){
System.out.print(" "+pr2[r]);}
}
//if (!pr1[n].equals(pr2[r]))
str4=str4+pr1[n];
str5=str5+pr2[r];
}  }

System.out.println(" ");
System.out.println(" "+str4);
System.out.println(" "+str5);
}}