Reverse a string gives error | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Reverse a string gives error

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(); for (int i = arr.length-1; i>=0; i--) { Ā Ā Ā Ā System.out.print(arr[i]); } } }

10th Jul 2021, 1:30 PM
Dolly Jain
Dolly Jain - avatar
1 Resposta
0
Your code contains invalid characters which prevents code from being proccesed. You can see them if you view the code in browser.
10th Jul 2021, 2:03 PM
Ipang