1 / 5
May 2011

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package mispelling;

import java.util.Scanner;

/**
*
* @author roger
*/
public class Main {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    // TODO code application logic here

Scanner s=new Scanner(System.in);
Scanner u = s.useDelimiter("\n");
short x=u.nextShort();
char [] array=new char[20];
while(x>0)
{
String sq = u.next();
x--;

String sw=sq.substring(0, 1);
sq.getChars(2, sq.length(), array, 0);
int as=Integer.parseInt(sw);
//System.out.println(array[0]);
System.out.print(sw+" ");
for(int i=0;i {if(i+1==as)
{
i=i+1;
}
System.out.print(array[i]);

}
System.out.println();
for(int j=0;j {array[j]=0;
}
}
}
}

question

  • created

    May '11
  • last reply

    May '11
  • 4

    replies

  • 307

    views

  • 3

    users

question indeed.

What problem are you submitting this to? Where are your code tags?

Do not include the code in any package and use code tags while posting in forum.

For us to troubleshoot we need the code that you actually submit. Its frustrating to find an issue, post it on the forum: and have you say that's bot what you submitted.

Suggested Topics

Want to read more? Browse other topics in JAVA based languages or view latest topics.