Advertisement
swarley

Moder Perl Example

Aug 31st, 2011
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.70 KB | None | 0 0
  1. Suppose you’re given the following arrays containing participant information:
  2. @firstnames = ("Sarah", "Jareth", "Ludo", "Hoggle");
  3. @lastnames = ("Williams", "King", "Beast", "Dwarf");
  4. @ages = (15, 39, 33, 43);
  5. @nativelanguages = ("English", "English", "Romanian", "English");
  6. @performancescores = (85, 99, 35, 75);
  7. Write a script that calculates the average performance score and prints out the mem-
  8. bers of the groups meeting the following criteria (each criterion should produce one
  9. group, rather than identifying a group that meets all four criteria):
  10. (a) native language is English
  11. (b) age is greater than 20
  12. (c) age is greater than 20 and native language is English
  13. (d) performance score is greater than 70
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement