Import java.util.Scanner;
Public class control3
{
Public static void Ingresar(double Nota_1[],double Nota_2[],double Nota_3[]; string Alumnos[], Scanner Entrada);
{
For (int i=0; i < Nota_1.length; i++)
{
System.
out.
print(“Nombre del Alumno
:”
); Alumnos[i]=entrada.next();
System.
out.
print(“1era Nota
:”
); Nota_1[i]=entrada.nextdouble();
System.
out.
print(“2da Nota
:”
); Nota_2[i]=entrada.nextdouble ();
System.
out.
print(“3era Nota
:”
); Nota_3[i]=entrada.nextdouble();
}
}
Public static double Promedio(double Nota_1[],double Nota_2[],double Nota_3[], string Alumnos[]);
{
double prom, suma=0;
For (int i=0; i < Nota_1.length; i++)
{
Prom= (Nota_1[i]+ Nota_2[i]+ Nota_3[i])/3;
Suma= suma + prom;
Return suma;
System.
out.
print(“El promedio de ”, Alumnos
[i
], “es
: ”, Prom
); }
}
Public static double Promedio_general(double suma);
{
promgeneral= suma / 30;
System.
out.
print(“El promedio del curso Fundamentos de Programación es
: ”, promgeneral
); }
Public static void main
(String[] args
); {
Scanner Entrada = new Scanner(system.in);
double Nota_1[], Nota_2[], Nota_3[], Promedio, Promedio_general;
Int n=30;
Nota_1[] = new double[n];
Nota_2[] = new double[n];
Nota_3[] = new double[n];
Ingresar (Nota_1, Nota_2, Nota_3, Alumnos, Entrada);
Promedio= Promedio (Nota_1, Nota_2, Nota_3, Alumnos);
Promedio_general = Promedio_general(suma);
}
}
SW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKUHVibGljIGNsYXNzIGNvbnRyb2wzCnsKCVB1YmxpYyBzdGF0aWMgdm9pZCBJbmdyZXNhcihkb3VibGUgTm90YV8xW10sZG91YmxlIE5vdGFfMltdLGRvdWJsZSBOb3RhXzNbXTsgc3RyaW5nIEFsdW1ub3NbXSwgU2Nhbm5lciBFbnRyYWRhKTsKCXsKCQlGb3IgKGludCBpPTA7IGkgPCBOb3RhXzEubGVuZ3RoOyBpKyspCgkJewoJCQlTeXN0ZW0ub3V0LnByaW50KOKAnE5vbWJyZS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4oCdLCBwcm9tZ2VuZXJhbCk7Cgl9CgoKCVB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpOwoJewkKCVNjYW5uZXIgRW50cmFkYSA9IG5ldyBTY2FubmVyKHN5c3RlbS5pbik7Cglkb3VibGUgTm90YV8xW10sIE5vdGFfMltdLCBOb3RhXzNbXSwgUHJvbWVkaW8sIFByb21lZGlvX2dlbmVyYWw7CglTdHJpbmcgQWx1bW5vc1tdOwoJSW50IG49MzA7CgkKCU5vdGFfMVtdID0gbmV3IGRvdWJsZVtuXTsKCU5vdGFfMltdID0gbmV3IGRvdWJsZVtuXTsKCU5vdGFfM1tdID0gbmV3IGRvdWJsZVtuXTsKCUFsdW1ub3NbXSA9IG5ldyBTdHJpbmdbbl07CglJbmdyZXNhciAoTm90YV8xLCBOb3RhXzIsIE5vdGFfMywgQWx1bW5vcywgRW50cmFkYSk7CglQcm9tZWRpbz0gUHJvbWVkaW8gKE5vdGFfMSwgTm90YV8yLCBOb3RhXzMsIEFsdW1ub3MpOwoJUHJvbWVkaW9fZ2VuZXJhbCA9IFByb21lZGlvX2dlbmVyYWwoc3VtYSk7CgoJfQoKfQoK
Main.java:1: error: class, interface, or enum expected
Import java.util.Scanner;
^
Main.java:3: error: class, interface, or enum expected
Public class control3
^
Main.java:5: error: <identifier> expected
Public static void Ingresar(double Nota_1[],double Nota_2[],double Nota_3[]; string Alumnos[], Scanner Entrada);
^
Main.java:5: error: ')' expected
Public static void Ingresar(double Nota_1[],double Nota_2[],double Nota_3[]; string Alumnos[], Scanner Entrada);
^
Main.java:5: error: ';' expected
Public static void Ingresar(double Nota_1[],double Nota_2[],double Nota_3[]; string Alumnos[], Scanner Entrada);
^
Main.java:5: error: <identifier> expected
Public static void Ingresar(double Nota_1[],double Nota_2[],double Nota_3[]; string Alumnos[], Scanner Entrada);
^
Main.java:7: error: '.class' expected
For (int i=0; i < Nota_1.length; i++)
^
Main.java:7: error: > expected
For (int i=0; i < Nota_1.length; i++)
^
Main.java:7: error: not a statement
For (int i=0; i < Nota_1.length; i++)
^
Main.java:7: error: ';' expected
For (int i=0; i < Nota_1.length; i++)
^
Main.java:9: error: illegal character: '\u201c'
System.out.print(?Nombre del Alumno:?);
^
Main.java:9: error: ';' expected
System.out.print(?Nombre del Alumno:?);
^
Main.java:9: error: ';' expected
System.out.print(?Nombre del Alumno:?);
^
Main.java:9: error: illegal character: '\u201d'
System.out.print(?Nombre del Alumno:?);
^
Main.java:11: error: illegal character: '\u201c'
System.out.print(?1era Nota:?);
^
Main.java:11: error: malformed floating point literal
System.out.print(?1era Nota:?);
^
Main.java:11: error: ';' expected
System.out.print(?1era Nota:?);
^
Main.java:11: error: illegal character: '\u201d'
System.out.print(?1era Nota:?);
^
Main.java:13: error: illegal character: '\u201c'
System.out.print(?2da Nota:?);
^
Main.java:13: error: ';' expected
System.out.print(?2da Nota:?);
^
Main.java:13: error: ';' expected
System.out.print(?2da Nota:?);
^
Main.java:13: error: illegal character: '\u201d'
System.out.print(?2da Nota:?);
^
Main.java:15: error: illegal character: '\u201c'
System.out.print(?3era Nota:?);
^
Main.java:15: error: malformed floating point literal
System.out.print(?3era Nota:?);
^
Main.java:15: error: ';' expected
System.out.print(?3era Nota:?);
^
Main.java:15: error: illegal character: '\u201d'
System.out.print(?3era Nota:?);
^
Main.java:25: error: <identifier> expected
Public static double Promedio(double Nota_1[],double Nota_2[],double Nota_3[], string Alumnos[]);
^
Main.java:28: error: '.class' expected
For (int i=0; i < Nota_1.length; i++)
^
Main.java:28: error: > expected
For (int i=0; i < Nota_1.length; i++)
^
Main.java:28: error: not a statement
For (int i=0; i < Nota_1.length; i++)
^
Main.java:28: error: ';' expected
For (int i=0; i < Nota_1.length; i++)
^
Main.java:33: error: illegal character: '\u201c'
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: ';' expected
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: illegal character: '\u201d'
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: not a statement
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: ';' expected
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: illegal character: '\u201c'
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: illegal character: '\u201d'
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: illegal start of expression
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:33: error: ';' expected
System.out.print(?El promedio de ?, Alumnos[i], ?es: ?, Prom);
^
Main.java:37: error: <identifier> expected
Public static double Promedio_general(double suma);
^
Main.java:41: error: illegal character: '\u201c'
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: ';' expected
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: ';' expected
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: ';' expected
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: ';' expected
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: illegal character: '\u201d'
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: illegal start of expression
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:41: error: ';' expected
System.out.print(?El promedio del curso Fundamentos de Programaci?n es: ?, promgeneral);
^
Main.java:45: error: <identifier> expected
Public static void main(String[] args);
^
Main.java:52: error: not a statement
Nota_1[] = new double[n];
^
Main.java:52: error: ';' expected
Nota_1[] = new double[n];
^
Main.java:52: error: ']' expected
Nota_1[] = new double[n];
^
Main.java:52: error: ';' expected
Nota_1[] = new double[n];
^
Main.java:53: error: not a statement
Nota_2[] = new double[n];
^
Main.java:53: error: ';' expected
Nota_2[] = new double[n];
^
Main.java:53: error: ']' expected
Nota_2[] = new double[n];
^
Main.java:53: error: ';' expected
Nota_2[] = new double[n];
^
Main.java:54: error: not a statement
Nota_3[] = new double[n];
^
Main.java:54: error: ';' expected
Nota_3[] = new double[n];
^
Main.java:54: error: ']' expected
Nota_3[] = new double[n];
^
Main.java:54: error: ';' expected
Nota_3[] = new double[n];
^
Main.java:55: error: not a statement
Alumnos[] = new String[n];
^
Main.java:55: error: ';' expected
Alumnos[] = new String[n];
^
Main.java:55: error: not a statement
Alumnos[] = new String[n];
^
65 errors