DINO_CH

Untitled

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