1 / 5
Nov 2020

You need to post the code, not a screen shot of the code. How can I test a screen shot?

sorry about that, i am new here.

here’s the code

import java.io.;
import java.util.
;

public class Main
{
public static void main(String[] args) throws IOException
{
try{
Scanner in = new Scanner(System.in);
int x = in.nextInt();
System.out.print(x);
int i = x;
while(i>=0){
String str = in.nextLine();
int len = str.length()/2;
int a=0;
while(a<len){
System.out.print(str.charAt(a));
a+=2; }
System.out.println();
i–;
}
}catch(Exception e){
return;
}
}
}