Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class VetorTurma {
- public static void main(String[] args) {
- int pontuacao = 0,nota,c;
- String nome;
- Scanner sc = new Scanner(System.in);
- double gabaritoVetor[] = new double[10];
- double notaVetor[] = new double[10];
- System.out.println("Digite o gabarito: ");
- for(c=0;c < gabaritoVetor.length;c++){
- System.out.print("Gabarito | questão["+c+"]: ");
- gabaritoVetor[c]=sc.nextDouble();
- }
- int i = 0;
- for(i=0;i < notaVetor.length;i++){
- System.out.print("Questão["+i+"]: ");
- notaVetor[i] = sc.nextDouble();
- }
- if(gabaritoVetor==notaVetor){
- pontuacao ++;
- }
- System.out.println("Pontuação: "+pontuacao);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement