{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lab14b - [3 6 9 12 9 6 3 is going Up false[1 2 3 4 5 6 7 8...

This preview shows page 1. Sign up to view the full content.

Lab Goal : This lab was designed to teach you how to use an array. Lab Description : Take in any integer array and determine if that array is going up or going down. An array that is going up will contain values that increase. [1,2,3,4,5] is going up. [1,2,3,0,8] is not going up. An array that is going down will contain values that decrease. [5,4,3,2,1] is going down. [5,4,9,1,0] is not going down. Sample Data : See below Sample Output : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] is going Up ? true [1, 2, 3, 9, 11, 20, 30] is going Up ? true [9, 8, 7, 6, 5, 4, 3, 2, 0, -2] is going Up ? false
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [3, 6, 9, 12, 9, 6, 3] is going Up ? false [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] is going Down ? false [1, 2, 3, 9, 11, 20, 30] is going Down ? false [9, 8, 7, 6, 5, 4, 3, 2, 0, -2] is going Down ? true [3, 6, 9, 12, 9, 6, 3] is going Down ? false A+ Computer Science Arrays - www.apluscompsci.com Computer Science I Lab 14B GOING UP OR DOWN Lab Value - 100 basic array code int array = {3,4,5,65,6,7,8,81}; for(int i=0; i&amp;lt;array.length; i++) { out.println(array[i]); } Files Needed :: ArrayFunHouseTwo.java Lab14b.java...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online