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

Write the word and expanded form for 763,136.43
Patrick Henry called upon colonists to unite as ______ against Great Britain. A) Americans B) Patriots
which of these describe the composition of earths atmosphere? A) mixture B) substance C) compound
It's from a movie. What does it say
What mathematical symbol can you put between four and five to make a number larger than four and smaller than five?
Jason is 34 less than three times Brandon age. The difference between their ages is two. How old is Jason?
What are two equivilent ratios for 4:3
True Or False? Arthropods are the most numerous phylum.
What was President Roosevelt's set of policies commonly called? A. Big Compromise B. Scheme One C. Square Deal D. Trust Busters
Answer the questions please!!! a small round fruit with purple, red or yellow skin and a hard stone inside a pastry with meat, vegetables or fruit inside a food