0

Reversing are char

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(); // Any other way aside my solution given below. //your code goes here int arrLen = arr.length; for(int i = arrLen; i >= 0; i--){ System.out.println(arr[i]); } } }

30th Nov 2022, 11:37 AM
Uchenna Bethel Orji
Uchenna Bethel Orji - avatar
0 Réponse