comit inicial

This commit is contained in:
250413
2025-11-13 15:56:26 +00:00
commit 62891bfb75
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
*/
package com.mycompany.exs12;
import java.util.Scanner;
/**
*
* @author 250413
*/
public class Exs12 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double soma = 0;
for(int i = 0; i < 12 ; i++){
System.out.println("Introduza o valor da fatura " + i + 1);
double valor = scanner.nextDouble();
soma += valor;
}
double media = soma / 12;
System.out.println("A media das faturas é " + media);
}
}