Created
August 11, 2022 02:17
-
-
Save fida10/3f712fe3a55a52d68c8233cba8cfa4ba 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
package Fida; | |
public class basic { | |
public static void main(String[] args) { | |
int[] numbers = {23, 231, 64, 7, 324}; | |
int sum = 0; | |
for(int i = 0; i < numbers.length; i++){ | |
System.out.println(numbers[i]); | |
sum = sum + numbers[i]; | |
} | |
System.out.println("The average is: " + sum / numbers.length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment