Presentation is loading. Please wait.

Presentation is loading. Please wait.

LAB SESSION ONE DIMENSIONAL ARRAY.

Similar presentations


Presentation on theme: "LAB SESSION ONE DIMENSIONAL ARRAY."— Presentation transcript:

1 LAB SESSION ONE DIMENSIONAL ARRAY

2 Question 1 (edited FROM csc 128 march 2012 exam paper)
Compass is currently holding a charity car wash for a week. You are asked to write a program that calculates and displays the total collection, the average collection, and the minimum and maximum collection for the week. Thus, create an array of floating point of size SEVEN (7) to store the total collection per day from Monday through Sunday. Sample input and output as below:

3 QUESTION 2 (taken FROM csc 128 okt 2012 exam paper)

4 Question 3 (taken FROM csc 128 sept 2011 exam paper)
Write a program that accepts any number of integers from the user in the range of 1 to 50 only. Only numbers in the range 1 to 50 should be stored in an array. The maximum size of the array is 100. Calculate the sum of the integers in the array and display the result. Assume the input ends when -1 is encountered.


Download ppt "LAB SESSION ONE DIMENSIONAL ARRAY."

Similar presentations


Ads by Google