Fernaless
Schon lange hier
Hallo,
ich habe hier ein Programm in Java-Code, den ich in irgendeine Programmiersprache "umschreiben" soll. Da ich aber keine andere Programmiersprache kann, bitte ich um Hilfe.
Vielen Dank.
ich habe hier ein Programm in Java-Code, den ich in irgendeine Programmiersprache "umschreiben" soll. Da ich aber keine andere Programmiersprache kann, bitte ich um Hilfe.
PHP:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package array;
import java.util.*;
/**
*
* @author Garryphoenix (Ines Becker), Fernaless (Maximilian Hoegner)
*/
public class Array {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner console= new Scanner(System.in);
System.out.println("Bitte geben sie die anzahl der Schueler ein: ");
int anzahlSchueler=console.nextInt();
float[][] d2array=new float[anzahlSchueler][];
for(int i=0; i<d2array.length;i++){
System.out.print("Wieviele Noten hat der Schueler "+(i+1)+" ");
int anzahlNoten=console.nextInt();
d2array[i]=new float[anzahlNoten];
for(int j=0; j<d2array[i].length;j++){
System.out.println("Gebe die Note "+(j+1)+" ein:");
d2array[i][j]=console.nextInt();
}
}
for(int i=0; i<d2array.length;i++){
System.out.print("Die Noten fuer Schueler "+(i+1)+" sind");
for(int j=0; j<d2array[i].length;j++){
System.out.println(d2array[i][j]);
}
}
}
}
Vielen Dank.