Skip to content

Instantly share code, notes, and snippets.

@ramonmaruko
Created September 16, 2011 19:01
Show Gist options
  • Save ramonmaruko/1222833 to your computer and use it in GitHub Desktop.
Save ramonmaruko/1222833 to your computer and use it in GitHub Desktop.
public int GetMaxValue(Array numbers) {
max = numbers[0];
foreach(int number in numbers) {
if(number > max) max = number;
}
}
public int GetMinValue(Array numbers) {
min = numbers[0];
foreach(int number in numbers) {
if(number < min) min = number;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment