Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hint: For this exercise, use scnr . next ( ) to obtain the firstName and the lastName independently. Use scnr . nextInt ( ) to
Hint:
For this exercise, use scnrnext to obtain the firstName and the lastName independently.
Use scnrnextInt to obtain the digit number.
Write a program that creates a login name for a user, given the user's first name, last name, and a fourdigit integer as input. Output the login name, which is made up of the first six letters of the first name, followed by the first letter of the last name, an underscore and then the last digit of the number use the operator If the first name has less than six letters, then use all letters of the first name.
Ex: If the input is:
Michael Jordan
the output is:
Your login name: MichaeJ
Ex: If the input is:
Nicole Smith
the output is:
Your login name: NicoleS import java.util.Scanner;
public class LabProgram
public static void mainString args
Type your code here.
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