CSC 270 - Survey of Programming Languages

Assignment #22 - "Is he or she tall?"

Due Monday, December 12, 2016

Define a structure to represent a person, with name, height (in inches), and gender (either 'male or 'female).

Then develop a function that takes such a person, and categorizes the person as 'tall, 'medium, or 'short. For men, anything over 72 inches is tall, and anything under 63 inches is short. For women, anything over 69 inches is tall, and anything under 60 inches is short.

Hint: This will probably require two or three separate conds. You can nest one cond inside another, or you can write an auxiliary function or two, each function containing a single cond.

[Back to the Assignment List]