Question
2. Write a program (Ex2Lab8.java) that deletes all the vowels from a given string. You should read the string from keyboard. Example If the input
2. Write a program (Ex2Lab8.java) that deletes all the vowels from a given string. You should read the string from keyboard.
Example
If the input is: This is my sentence!, the output should be Ths s my sntnc!
3. Write a program (Ex3Lab8.java) that reverses a given string by using a loop. You should read the string from keyboard.
Example
"google" => "elgoog"
4. Write a program (Ex4Lab8.java) that prints the characters of a String variable str in a diagonal line downward.
Example
if str contained "Washington", the output would be:
washington.png
5. Write a program (Ex5Lab8.java) that prints all the prime numbers smaller that a given N. Prime number is not divisible by any number other than 1 and itself.
Example
if the given number is N = 45, the prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43
6. Write a program (Ex6Lab8.java) to play the game of "Guessing Number II". Firstly, use Random generator to generate a number(0-9), then let the user input a guess, if they are the same, print "Congratulations! You win!". Otherwise, every time the user guesses wrong, you tell the user whether the number is higher or lower. (Note that do not change the generated random number before the user hits it)
7. Write a program (Ex7Lab8.java) that Check a positive number is a palindrome or not. A palindrome number is that if you reverse the whole number you will get exactly the same number.
Example
11, 121, 1, 12321 are palindrome numbers.
23, 32, 1232 are not palindrome numbers.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started