//inicio do programa
package calculodenotas;
import java.util.Scanner;
public class CalculoDeNotas {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
//DECLARAÇÃO DE VARIAVEIS
int quantidadeAlunos;
int[] qtdAlunos;
int x;
String[] nomeAlunos;
//ATRIBUIÇÃO DE MEMORIA PARA OS ARRAYS
System.out.println("Informe a quantidade de alunos da sala de aula: ");
quantidadeAlunos = input.nextInt();
qtdAlunos = new int[quantidadeAlunos];
nomeAlunos = new String [quantidadeAlunos];
//LAÇOS DE REPETIÇÕES, CAPTURAR NOME DOS ALUNOS
System.out.println("Digite o nome dos " + quantidadeAlunos + " Alunos");
for(x=0; x<quantidadeAlunos; x++){
System.out.println("Nome: ");
nomeAlunos[x] = input.nextLine();
}
}
}
Asked
Active
Viewed 22 times
0

Turing85
- 18,217
- 7
- 33
- 58
-
1Could you translate your program? As-is, understanding its semantics for a non-native speaker is kind of hard. Where does it jump? Please create a [MCVE], with input, expected behaviour and observed behaviour. – Turing85 Apr 14 '18 at 15:46
-
Also, what inputs did you run your program with? – umop apisdn Apr 14 '18 at 15:48