Skip to content

Instantly share code, notes, and snippets.

@cobymotion
Last active February 28, 2024 14:13
Show Gist options
  • Save cobymotion/0588ed8d3a2895d9a7cec5b618e7ec9f to your computer and use it in GitHub Desktop.
Save cobymotion/0588ed8d3a2895d9a7cec5b618e7ec9f to your computer and use it in GitHub Desktop.
OmegaUP Ej774
import java.util.*;
/**
Author: Luis Cobián
*/
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
float suma =0;
for(int i=0;i<n;i++){
int c = sc.nextInt();
suma = suma + c;
}
float promedio = suma/n;
System.out.printf("%.2f\n",promedio);
}
}
@cobymotion
Copy link
Author

Solución 28 febrero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment