Modify a text file: $/p9s.pde
$/p9s.pde
//// Project #9 String title= "Project 9m: array of integers"; String help= "Press key with first letter of a function ('?' for help; 'q' to quit)"; String author= "Your Name"; int[] z= { 999, 44, 1234, 42, 595, 666, 13, 55, 710, 6, 33 }; int many= z.length; void setup() { size( 500,400 ); } void draw() { background( 150,250,200 ); if (keyPressed && key == '?') { help(); return; } fill( 150, 0, 0 ); textSize(16); int next=18; // Display the numbers. float x=50, y=50; for (int j=0; j
a[w]) w=j; } return w; } int wheresmall( int[] a, int m ) { int w=0; for( int j=1; j
1; m--) { int w= wherebig( q, m ); swap( q, w, m-1 ); } }