Write a program that accepts a String value from the user and displays the reverse of that value. For additional challenge, determine if the String and its reverse are equal and display a message explaining the result.
import java.util.Scanner;
//ReverseString.java
class ReverseString{
public static String reverse(String str){
if(str.length() == 0){
return "";
}
else{
return str.charAt(str.length()-1)+reverse(str.substring(0,str.length()-1));
}
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.printf("Enter string: ");
String str = scanner.nextLine();
String reversedString = reverse(str);
System.out.println("Reversed: "+reversedString);
if(str.equals(reversedString)){
System.out.println("String and its reverse are equal");
}
else{
System.out.println("String and its reverse are NOT equal");
}
}
}


Write a program that accepts a String value from the user and displays the reverse of...
write a C++ function that accepts a pointer to a C-string as an argument and displays its contents backward. For instance, if the string argument is “ Gravity ” the function should display “ ytivarG ”. Demonstrate the function in a program that asks the user to input a string and then passes it to the function.
[10 marks] Write a recursive method, reverse, that displays a string in a reverse order. For example, reverse("UBC-O") displays O-CBU. Use a helper method to improve the performance of your program. Write a test program that prompts the user to enter a string and displays its reversal. MUST HAVE A HELPER METHOD TO IMPROVE PERFORMANCE. FOR JAVA THANK YOU!
Write a program that prompts the user for a String value and a character value. The program should then find the last occurrence of the provided character in the provided String and display the corresponding index. If the character is not found in the String, display -1. For additional challenge, create a multi-class solution. The business class should consist of two instance varaibles to store the user provided values and one method to accomplish the given task. The tester class...
Write a program in MIPS to accept a string from a user, reverse that string and print it out to the user. You must write a procedure that performs the reversal task. Example: Please Enter a String: Hello How Are You Reversed String: uoY erA woH olleH
PYTHON PROGRAM Write an application that accepts a sentence as input from the user and displays all of the words in the sentence that have an odd number of letters in them
Write a java program that accepts a string from the user. List all characters in the string from lowest ASCII value to highest and output the number of occurrences for each of those characters.
Write a C++ program that accepts a string from the user and then replaces all occurrences of the letter e with the letter x.
write a program in java that asks the user for a sentence, and then returns that string with the words backwards. For example: Enter a sentence! Mary had a little lamb. Your sentence backwards: lamb. little a had Mary Write a method called reverse() that accepts a sentence as a string, and then returns that string with the words backwards. Write a main() method that gets the string from the user and then displays the string backwards. demonstrate program by...
Write a C++ program that reads strings until "QUIT" input, which then displays all strings in the reverse order they were entered.Tell the user the program will read strings until "QUIT" is entered.LoopAsk user for a stringIf the string is "QUIT" break the loop, otherwise store data3. Inform user data will be displayed in reverse.4. Display ALL strings in reverse.5. Free the space used to store the strings.
Python please Write a function print_back_upper() that accepts a string my_str as an argument and displays the string backwards and in uppercase, all in one line (Note: Create any necessary variables) For example: if my_str = "Python" then, your output should display as follows: NOHTYP (Hint: You can use for loop navigating up to range of len of string-1, -1, -1 and use reverse() and upper() functions to create and display the string backwards in uppercase)