Good, I have this method done in Java and the result that returns is a number with many decimals, I would like some way for me to return two decimals only.
Code:
public static float calcularMedia(int[] notas)
{
float resultado = 0;
for(int nota: notas)
{
resultado+=nota;
}
return resultado/notas.length;
}