+ 1
I cannot find the problem in my cod,can someone help me?
import java.util.Scanner ; public class Program { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); String var= scanner.Next(); char[] arr=varr.ToCharArray(); int c; for(c=arr.length; c>0;c--) { System.out.println(arr[c]); } } }
2 Respostas
+ 1
// You have to read all more carefuly, quite much incorrect:
import java.util.Scanner ;
public class Program
{
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
String var= scanner.nextLine();
char[] arr=var.toCharArray();
int c;
for(c=arr.length-1; c>=0;c--)
{
System.out.println(arr[c]);
}
}
}
+ 1
Thank You,i will be more careful.