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

What is 3 1/2 times 2 4/5​
What is the study of an organism's body structures and their locations called?
George Washington warned against America not becoming entangled with European affairs. True False
Which of the following is NOT an ethic group in the Middle East? A. Berbers B. Polynesian C. Assyrians D. Greeks
what is the expression of this problem (9+6x)8
The difference of a positive integer minus a negative integer is... always negative always positive sometimes negative never positive
What is the volume of the rectangular prism shown? Please answer ASAP
NEED HELP ASAP!!!!!!!!!!!!!!! Where will you encounter the least amount of life in the oceans? abyssal plains (the ocean's bottom) the beach the top 200 meters
an artisan, shopkeeper, or owner of a small farm are called what​
If you witness a child collapse you should activate ems or begin cpr