250409 2025-11-13 15:54:16 +00:00
commit 91a7780d00
1 changed files with 26 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.mavenproject1;
import java.util.Scanner;
/**
*
* @author 250409
*/
public class Mavenproject1 {
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 média das faturas é " + media);
}
}