I have my first assignment for structured and object oriented problem solving.
This is the problem and I wrote a program that had to include modules. I wanted to find out if what i did had any errors or if it is even written correctly at all. If its not what can I do to fix it? Thank you!
Plan the logic for a program that calculates the goen size a student needs for a graduation ceramony. The program uses 3 modules. The first prompts a user for and accepts the students height in inches. The seconed module accepts students weight and converts the students height to centimeters and weight to grams. Then it calulates the gown size by addin 1/3 of the weight in grams to the value of the height in centimeters. The programs output is gown size and. There are 2.54cm in an inch and 453.59 grams in a pound. The last module displays the message "End of job"
Im not sure what declarations are needed.
start
Declarations
studentHeight ()
gownSize ()
endOfJob ()
stop
studentHeight ()
ouput "Please enter students name"
input name
output " Please enter students height"
imput height
return
gownSize()
output "please enter students weight"
imput student weight
heightCenti = studentHeight * 2.54 / studentHeight
weightGrams = studentWeight * 453.59 / studentWeight
dividedWeight = weightGrams / 3
gownSize = dividedWeight + heightCenti
output gownsize
return
endOfJob ()
output END_LINE
return