Created
December 15, 2010 03:05
-
-
Save kritzikratzi/741570 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void printMaxValue( int start, int end ){ | |
int maxValue = 0; | |
println( "Considering " + lines.length + " lines: (chars " + start + " to " + end + ")" ); | |
for( int i = 0; i < lines.length; i++ ){ | |
if( lines[i].length() >= end ){ | |
println( i + ": extracted " + lines[i].substring( start, end ) + ", which parses as " + int( lines[i].substring( start, end ) ) ); | |
maxValue = max( maxValue, int( lines[i].substring( start, end ) ) ); | |
} | |
else{ | |
println( i + ": too short!" ); | |
} | |
} | |
println( "--- that would be all!" ); | |
println( maxValue ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment