Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. public class VetorTurma {
  2.  
  3. public static void main(String[] args) {
  4.  
  5. int pontuacao = 0,nota,c;
  6. String nome;
  7.  
  8. Scanner sc = new Scanner(System.in);
  9.  
  10. double gabaritoVetor[] = new double[10];
  11. double notaVetor[] = new double[10];
  12.  
  13. System.out.println("Digite o gabarito: ");
  14. for(c=0;c < gabaritoVetor.length;c++){
  15. System.out.print("Gabarito | questão["+c+"]: ");
  16. gabaritoVetor[c]=sc.nextDouble();
  17.  
  18.  
  19. }
  20. int i = 0;
  21. for(i=0;i < notaVetor.length;i++){
  22. System.out.print("Questão["+i+"]: ");
  23. notaVetor[i] = sc.nextDouble();
  24.  
  25.  
  26.  
  27. }
  28.  
  29. if(gabaritoVetor==notaVetor){
  30. pontuacao ++;
  31.  
  32.  
  33. }
  34.  
  35. System.out.println("Pontuação: "+pontuacao);
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement