import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
Scanner tecl = new Scanner(System.in);
//
String [] vector = new String[5];
//
int [] ventas = (120,150,90,180,160);
//
int x = (ventas.length-1);
//
int total=0;
while (x>=0)
//
total += ventas[x];
x--;
}
//
double prome=0;
//
prome = (double) total/ventas.length;
System.out.println("Resultado de operacion " + (50+25*10-50));
System.out.println ("El total de la ventas fue:" + "\n el promedio")
for(int i=0; i < ventas.length; i++)
total += ventas[i];
prome = total/ventas.length;
System.out.println(prome);
System.out.println("********** \n\nPrueba dos " + prome)
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: