Create a loop to print a table with all the characters in


- Use the Scanner class to accept input from the user.

Prompt the user for their first name, last name, and age each individually.

Use string concatenation to obtain the user's full name.

Compare the length of the first and last name and if they are the same print:

- "Hello First Last"

- "Your first and last name have both n letters"

- where First and Last are the first name and last name, and n is the length of these names.

- If the first and last name are of different size, print:

"Hello First Last"

" The length of your first name is: n"

" The length of your last name is: m"

- where First and Last are the first name and last name, and n and m are the lengths of these names.

- Create a loop to print a table with all the characters in the user's full name and their corresponding ASCII value. You may use the charAt() method of the String class to identify each of the characters in the full name and type cast them as int to obtain their ASCII value (see example).

- Print out the user's age with the format shown in the example below.

Print out the year the user was born with the format shown in the example below. This year is obtained by subtracting the age from the current year.

Using increment, increase the age by one and create the output shown in the example below.

Using compound assignment operators, increase the age by 4 more and create the output shown in the example below.

Do not forget to use comments to describe your program and variables. Also do not forget to indent it properly.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Create a loop to print a table with all the characters in
Reference No:- TGS01114398

Now Priced at $35 (50% Discount)

Recommended (96%)

Rated (4.8/5)