import java.util.*;
public class DiffOfMaxMinValue1 {
public static void main(String args[]) {
int my_arr[] = { 12, 15, 4, 9, 32, 70, 87, 98, 0, 5 };
int max_value = my_arr[0];
int min_value = my_arr[0];
for (int i = 0; i < my_arr.length; i++) {
if (my_arr[i] > max_value) {
max_value = my_arr[i];
} else if (my_arr[i] < min_value) {
min_value = my_arr[i];
}
}
System.out.println("The difference of maximum and minimum value in the given array is :");
System.out.println(max_value-min_value);
}
}