Hello, i have a question about java programming. Please help anyone..this is going to be on my test tomorrow.?
this is what i am using as my input file.
1) 67 23 49 27 51 57 55 12 10 3
2) 13 98 14 72 73 81 64 53 2 21 33 19 35 26 1
3) 99 88 77 66 55 44 33 22 11 12 23 34 45 56 67 78 89 91 21 32
private static void printArray( int array[], int cnt ); // print all values in the array on one line with a space after each number
private static void printAllBelow( int array[], int cnt, double ave ); // print all values that are less than the aveerage on one line
private static void printAllAbove( int array[], int cnt, double ave ); // print all values that are greater than the average on one line
private static int findMin( int array[], int cnt ) // return the smallest int in the array
private static int findMax( int array[], int cnt ) // return the largest
private static double findAve( int array[], int cnt ) // return the average
i know that to print all values of an array goes like this,
for( int i = 0; i< myArray.length; i++)
System.out.println( myArray[i]);
System.out.print(a
for( int i = 0; i<myArray.length; i++){
System.out.println( "myArray["+i+"]"+"="+myArray[i]);
System.out.println();
}
Cycle for( int i = 0; i<myArray.length; i++) stare when i = 0 and ends at and i> myArray.lengt, myArray.length - number of array
elements, then use Standard output java System.out.println( "myArray["+i+"]"+"="+myArray[i]);, displays the array Move to another term System.out.println(); ,by the console without input parameter
Example output (myArray.lengt=3)
myArray[0]=(value myArray[0]);
myArray[1]=(value myArray[1]);
myArray[2]=(value myArray[2]);;
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF