Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JOptionPane;
- //Programa sugerido pela Miriã. Pegar nome e notas de 5 alunos
- //Após mostrar o nome e suas notas
- public class programaPegaNotaAluno {
- public static void main(String[] args){
- Aluno aluno[] = new Aluno[5];
- for(int i=0; i< 5; i++){
- aluno[i] = new Aluno();
- aluno[i].nome = JOptionPane.showInputDialog("Digite nome do aluno "+(i+1));
- //Digitando as notas do aluno informado
- for (int j=0; j<4; j++){
- aluno[i].notas[j] = Double.parseDouble(JOptionPane.showInputDialog("Digite a nota "+(j+1)+" do aluno "+aluno[i].nome));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement