Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that creates usernames for new email addresses: Create two variables, one that stores your first name ( as a String ) and
Write a program that creates usernames for new email addresses:
Create two variables, one that stores your first name as a String and another that stores the last digits of your student number as an integer Print them.
Using selection statements, check if the length of your first name is greater than characters
If it is longer than square root the student number variable and cast it to an integer.
If it is less than or equal to divide the student number variable by and then square the number using a Math method
Finally, concatenate your first name, the resulting student number, and @algomau.ca Print this final email address in the console to report it to the user.
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