Create a program that allows the user to input a list of first names into one array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. The output should be a list of emial addresses where the address is of the following form: [email protected]
Declare FirstName[100] as String
Declare LastName[100] as String
Declare email as String
Declare K as Integer
Declare index as Integer
Write "Enter first and last name."
Write "Enter * to exit"
Input FirstName[index]
While FirstName != "*"
If index >= OR FirstName[index]=="*"
Write "Enter last name"
Input LastName[index]
Set email[index] to
FirstName[index]+"."+LastName[index]+"@mycollege.edu"
Set index to index + 1
Write "Enter first name"
Write "Enter * to exit"
Input FirstName[index]
End While
Then loop = 1
While loop >=index
Output email[loop]
Set loop to loop + 1
End While
End If
End Then
Is this how I would write the pseudocode for this? Can someone make some tweaks or input. This is done in raptor also.
Declare FirstName[100] as String
Declare LastName[100] as String
Declare emails[100] as String
Declare size as Integer
Declare index as Integer
While True
Write "Enter first and last name."
Write "Enter * to exit"
Input FirstName[index]
If FirstName=="*"
Break
End If
Input LastName[index]
Set emails[index] to
FirstName[index]+"."+LastName[index]+"@mycollege.edu"
Set index to index + 1
Set Size to Size + 1
End While
For I 0 to Size
Write Emails[I]
End FOr
Get Answers For Free
Most questions answered within 1 hours.