DINO_CH

Untitled

Jan 29th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. package br.teste;
  2.  
  3. public class MediaAlunos {
  4.  
  5.     public static void main(String[] args) {
  6.        
  7.    
  8.     final double NOTA_MINIMA=7.0;
  9.      String []nomeAlunos= {"Joao","Ana","Carlos","Antonio"};
  10.      double []nota_Joao= {5.0,5.0,5.0,5.0};
  11.      double []nota_Ana= {6.0,6.0,6.0,6.0};
  12.      double []nota_Carlos= {7.0,7.0,7.0,7.0};
  13.      double []nota_Antonio= {8.0,8.0,8.0,8.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.          
  20.          for(int j=0;j<nota_Joao.length;j++){
  21.           {System.out.println(nota_Joao[j]);
  22.           if(j==nota_Joao.length){
  23.           break ;}}
  24.                
  25.           }
  26.          
  27.              for(int z=0;z<nota_Ana.length;z++){
  28.               {System.out.println(nota_Ana[z]);
  29.               if(z==nota_Ana.length){
  30.               break ;}}
  31.          
  32.              }
  33.        
  34.      }
  35.      
  36.    
  37.  
  38.      
  39.     }
  40.  }
Advertisement
Add Comment
Please, Sign In to add comment