They would seem out of place converting strings to integers and doubles, especially in this, but it is what is required for this particular exercise.
This is just the psuedocode for what is expected of this exercise.
Start main
Start main
//declare variables
input as string
name as string
age as integer
mileage as double
call DisplayApplicationInformation
call DisplayDivider(“Start Program”)
call DisplayDivider(“Get Name”)
set name = GetInput(“Your Name”)
display “Your name is: “ + name
call DisplayDivider(“Get Age”)
set input = GetInput(“Your Age”)
set age = convert input to integer
display “Your age is: “ + age
call DisplayDivider(“Get Mileage”)
set input = GetInput(“Gas Mileage”)
set mileage = convert input to double
//display mileage to 2 decimal places
display “Your car MPG is: “ + mileage
call TerminateApplication
end main program
procedure DisplayApplicationInformation
display “Welcome the Basic User Interface Program”
display “Name: YOUR NAME”
display “This program accepts user input as a string, then makes the appropriate data conversion”
end procedure
DisplayDivider(string outputTitle)
display “**************** “ + outputTitle + “****************”
end procedure
function GetInput(string inputType) as string
strInput as string
display “Enter the “ + inputType
get strInput
return strInput
end function
procedure TerminateApplication
display “Thank you for using the Basic User Interface program”
exit application
end procedure
I don't expect anyone to actually fix this, I was just hoping for some pointers. I understand how bad this looks, and I will listen to any advice offered.