Answer in C Language! Not C++, please! 5.23 LAB: Login name Write a program that creates a login name for a user, given

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Answer in C Language! Not C++, please! 5.23 LAB: Login name Write a program that creates a login name for a user, given

Post by answerhappygod »

Answer in C Language! Not C++, please!
5.23 LAB: Login name
Write a program that creates a login name for a user, given theuser's first name, last name, and a four-digit integer as input.Output the login name, which is made up of the first five lettersof the last name, followed by the first letter of the first name,and then the last two digits of the number (use the % operator). Ifthe last name has less than five letters, then use all letters ofthe last name. Assume the first name and last name have a maximumof 50 characters.
Hint: Make a new string, copy the characters from the first andlast names into the new string, and output the new string as partof the output. Don't forget to add a null character at the end ofthe new string after you have finished copying the characters.
Ex: If the input is:
the output is:
Ex: If the input is:
the output is:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply