Linux IV – Perl ProgrammingTake Home – Prelim Laboratory Examination      Directly print your code to short bond paper us...
(Hardcode this list of names into your program)Example:if the input numbers were 1, 4, 3, 4, and 4,the output names would ...
Upcoming SlideShare
Loading in …5
×

Linux IV - PERL

798 views
717 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
798
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
66
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Linux IV - PERL

  1. 1. Linux IV – Perl ProgrammingTake Home – Prelim Laboratory Examination  Directly print your code to short bond paper using notepad or DOS type command. Do not, copy paste it to other application. This will have an effect to the code.  Staple the bond paper with this questionnaire, being the first page, before submitting it.  Write your printed name at the upper left side of every bond paper you’ve used and affix your signature on top of the printed name.  Put it in a short brown envelope and write your full name, year and section, and subject in front of the envelope.  Submit your exam papers personally on or before 12:00 nn. of January 03 2011, Monday. Time will be based on the wall clock located at the stairway in ITCC.Non-compliance with the above instructions would invalidate your exam and thus will require youto take the special examName: ___________________________________ Year and Section: ______________ 1. Write a program that reads lines of input containing numbers, each of which is separated by a space, and prints out the following: a. The total/sum of numbers for each line b. The grand total/sum of all number Signal the end of input using Ctrl-D. 2. Write a program that reads a list of numbers (on separate lines) until end-of-input and then prints for each number the corresponding persons name from the list shown below. 1. joell 2. michelle 3. lorie 4. eds 5. grace 6. cory 7. reinier 8. tina 9. rochelle 10. ruth
  2. 2. (Hardcode this list of names into your program)Example:if the input numbers were 1, 4, 3, 4, and 4,the output names would be joell, eds, lorie, eds, and eds.

×