Lab 18 - April 22
To receive credit for this lab assignment, you must be finished by
Friday, April 25, at 10:00 p.m. After this time you will not receive any credit.Note: This lab assignment is HARD, so start EARLY!
Instructions:
1. Login to UNIX, and write a program to do the following:
Create an array of integers (array of size 10).
Read the integers from the user (While loop will be needed here)
- be sure to validate each number, and don't exit the while loop until you have 10 valid numbers
Once you read all the integers:
- print the array ( position: number <-- nicely)
- add the numbers in even positions print the sum. (0,2,4,6....)
- calculate the average of the numbers in odd positions. (1,3,5...)
3. Send an e-mail in Pine and attach your program to the e-mail. Send to the ics111-lab@hawaii.edu account. Make sure the subject is 'lab 18'.
4. Check the webpage to make sure that the e-mail arrived. Here is the URL:
5. Once I (TA) get the e-mail in my account AND I can verify it on the web, you will receive your lab participation point.
Link to the Java API - to look up any methods of any class you would like to use.