Perl Help

student

Beta member
Messages
1
Im not sure if im on the right thread but will somebody help me with my this problem please...

This is a perl Script prob:

Write a program that prompts a user to input 10 integer values. Store these values in a list that will have these 10 elements. Add all even elements together (that is, they have subscript values of 2, 4, 6, 8) and multiply the odd elements together (that is, they have subscript values of 1, 3, 5, 7, 9). For example, if the list were (11, 34, 9, 2, 8, 3, 21, 5, 19, 4), then the following would print to the screen:

The list of numbers used is: 11 34 9 2 8 3 21 5 19 4
The result of adding the even elements is: 48
The result of multiplying the odd elements is: 316008

PLease help.. I need some result before Friday..
Thanks much..
 
Back
Top Bottom