dillonseanbarr dillonseanbarr
  • 12-12-2020
  • Computers and Technology
contestada

Ask the user to input a word. Then, print the first letter, the last letter, and the length of the word on the same line with no spaces between them

Example:
Enter a word: apple
ae5

In edhesive please

Respuesta :

LynxVillicana
LynxVillicana LynxVillicana
  • 12-12-2020

Answer:

Scanner scan = new Scanner(System.in);

System.println("Enter a word: ");

String word = scan.nextLine();

System.out.println(word.substring(0,1) + word.substring(word.length()-1) + word.length());;

Explanation:

I'm going to assume that this is JavaScript.

Answer Link

Otras preguntas

Which describes the Sahara? tropical jungle with a variety of plants and animals high plains on which many African animals live a desert that covers the nort
is it two Snake's hole or two snakes' hole
what is five sixths plus one half? 5/6+1/2=
The ability of a material to transfer heat or electric current is called A. porosity. B. conductivity. C. insulation. D. convection.
What are the attributes of a monarchy
What is 4/6 simplified
When you multiply a number by itself multiple times, it's what
During the Renaissance, Italian cities became centers of A. photography B. warfare C. banking D. transportation
Which of the following will result in a chemical change? A. Burning coal in a furnace B. Drying wood in a shed C. Melting ice to obtain water D. Evaporating
the students in math class use square tiles to make arrays. Cleia says they can make more arrays with 8 tiles than with 9 tiles because 8 has more factors. Is C