here's my code so far, I need a method to calculate and print out the average of the odd numbers in the array, I've tried so far but none of my tried methods work, help?
public static void main(String[] args) {
int[] arr = new int[20];
for(int i = 0; i < arr.length; i++) {
arr[i] = (int)(Math.random()*999);
Aucun commentaire:
Enregistrer un commentaire