- 1
happy to help! :)
27th Apr 2021, 1:56 PM
minirkk
minirkk - avatar
+ 2
Por si ha alguien Le Interesa De como Lo Hice Fue asi : xd import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String text = scanner.nextLine(); char[] arr = text.toCharArray(); //tu cĂłdigo va aquĂ­ String a = String.valueOf(arr); StringBuilder str = new StringBuilder(a); a = str.reverse().toString(); System.out.print(a); } }
12th Oct 2021, 10:18 PM
Jhon Stiven Caicedo Mosquera
Jhon Stiven Caicedo Mosquera - avatar
0
import java.util.*; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String text = scanner.nextLine(); char[] arr = text.toCharArray(); // your spelling is wrong of "length" int j=arr.length-1; // i-- should be i++ since we need to traverse the chars of the string // also i=0 should start with zero because we need to traverse from left to right for (int i=j; i>=0; i--){ System.out.print(arr[i]); } } }
27th Apr 2021, 1:53 PM
minirkk
minirkk - avatar