import java.util.Scanner; public class BMI { public static void main(String[] arg) { Scanner sc = new Scanner(System.in); System.out.println("Enter a string"); String s=sc.nextLine(); for(int i=s.length()-1;i>=0;i--) System.out.print(s.charAt(i)); } }
No comments:
Post a Comment