import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a single string: ");
String str = scanner.nextLine();
String resultStr = str.substring(0, str.length() / 2) + " " + str;
System.out.println("Output: " + resultStr);
}
Comments
Leave a comment