Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ackage br.teste;
- public class MediaAlunos {
- public static void main(String[] args) {
- int minhaArray=4;
- final double NOTA_MINIMA=7.0;
- String []nomeAlunos= {"Joao","Ana","Carlos","Antonio"};
- double []nota_Joao= {10.0,7.0,5.0,4.5};
- double []nota_Ana= {7.0,6.5,7.0,7.5};
- double []nota_Carlos= {8.0,9.0,10.0,5.0};
- double []nota_Antonio= {9.0,9.5,8.0,10.0};
- //mostras o nome dos alunos e suas notas
- for(int i=0;i<nomeAlunos.length;i++) {
- System.out.println(nomeAlunos[i]);
- for(int j=0;j<nota_Joao.length;j++)
- do {System.out.println(nota_Joao[j]);}
- while(i<i++);
- }
- }
- }
- -----------------------------------------------RESULTADO---------------------------------------------------------------
- Joao
- 10.0
- 7.0
- 5.0
- 4.5
Advertisement
Add Comment
Please, Sign In to add comment