DINO_CH

Untitled

Jan 28th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. ackage br.teste;
  2.  
  3. public class MediaAlunos {
  4.  
  5.     public static void main(String[] args) {
  6.        
  7.     int minhaArray=4;
  8.     final double NOTA_MINIMA=7.0;
  9.      String []nomeAlunos= {"Joao","Ana","Carlos","Antonio"};
  10.      double []nota_Joao= {10.0,7.0,5.0,4.5};
  11.      double []nota_Ana= {7.0,6.5,7.0,7.5};
  12.      double []nota_Carlos= {8.0,9.0,10.0,5.0};
  13.      double []nota_Antonio= {9.0,9.5,8.0,10.0};
  14.      
  15.      //mostras o nome dos alunos e suas notas
  16.      
  17.      for(int i=0;i<nomeAlunos.length;i++) {
  18.             System.out.println(nomeAlunos[i]);
  19.             for(int j=0;j<nota_Joao.length;j++)
  20.          do {System.out.println(nota_Joao[j]);}
  21.          while(i<i++);
  22.      }
  23.        
  24.      
  25.    
  26.  
  27.      }
  28.  
  29.    }
  30.  
  31. -----------------------------------------------RESULTADO---------------------------------------------------------------
  32. Joao
  33. 10.0
  34. 7.0
  35. 5.0
  36. 4.5
Advertisement
Add Comment
Please, Sign In to add comment