You are on page 1of 1

Lab 10

Topic : Array
Objectives:
Upon completing the following tasks student should be able to
1) Identify the type dan size of array
2) Write a code to manipulate an array
Task 1
Write a program that read 5 decimal numbers and store these numbers in an array.
Identify the suitable name, type and size of this array. You program should be able to
display the contents of this array together with sum and average of all elements of the
array.
Save your program as lab10a.cpp
Task 2
Write a program that read daily temperature for a week. Use a suitable array to store
these values. Identify the highest and lowest daily temperature. Display the daily
temperature for a week, the highest and lowest temperature and the different between
highest and lowest temperature.
Save your program as lab10b.cpp
Task 3
Write a program that read 5 students scores and scort the score in descending order.
Display the data before and after the sorting process.
Save your program as lab10c.cpp

You might also like