Modify a text file: $/practice-array-show.pde
$/practice-array-show.pde
//// practice-array-show // Program to demonstrate arrays and algorithms void setup() { size(500,300); background(255,255,127); text( "//// practice-array-show // Program to demonstrate arrays and algorithms", 10, height-20 ); //// int[] a= new int[] { 55, 22, 33, 77, 11, 99, 88, 66, 44 }; int big; int many= a.length; // Find the biggest number. big= a[0]; for (int j=0; j
big) big= a[j]; } // Output the result. println("Biggest: "+big); fill(0,0,0); text("Biggest value in array: ", 10,50); text(big, 10,62); //// Now, sort the array. sortArray(a, many); //// Display array, showArray(a, many); } void sortArray( int a[], int many) { //// Sort the array } void showArray( int a[], int many) { //// Show the array int x=10, y=100; // Print and display for (int j=1; j