Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package testbr;
- import java.util.*;//import java.util.Random
- public class newTest {//criando um code que dara o nome dos alunos com suas notas trimestrais
- public static void main(String[] args) {
- String[]aluno={"Joao", "Marcelo", "Roberto", "Carmem" , "Maria"};//array alunos
- String[] trimestre= {"1trim", "2trim","3trim","4trim"};//array trimestre
- double[][]notas=new double [5][3];//array onde sera atribuido as notas
- Random num=new Random();//inicializando a classe Random
- for(int i=0;i<5;i++) {
- for(int j=0;j<3;j++) {
- notas[i][j]=num.nextInt(11);
- if(notas[i][j]>=5 && notas[i][j]<=10) {
- System.out.println((double)notas[i][j]);
- }
- System.out.println("=========================== separaƧao ===========================");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment