From 51ca432b25c0bd5f606b03e6e7ccb4f2ab9eb978 Mon Sep 17 00:00:00 2001 From: 250408 <250408@THINKPAD8.epvc2.local> Date: Thu, 13 Nov 2025 15:55:38 +0000 Subject: [PATCH] Comite inicial --- pom.xml | 13 ++++++++ .../com/mycompany/exercicio1/Exercicio1.java | 32 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/com/mycompany/exercicio1/Exercicio1.java diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..6e3e1b3 --- /dev/null +++ b/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + com.mycompany + Exercicio1 + 1.0-SNAPSHOT + jar + + UTF-8 + 24 + com.mycompany.exercicio1.Exercicio1 + + \ No newline at end of file diff --git a/src/main/java/com/mycompany/exercicio1/Exercicio1.java b/src/main/java/com/mycompany/exercicio1/Exercicio1.java new file mode 100644 index 0000000..1c42f72 --- /dev/null +++ b/src/main/java/com/mycompany/exercicio1/Exercicio1.java @@ -0,0 +1,32 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + */ + +package com.mycompany.exercicio1; + +import java.util.Scanner; + +/** + * + * @author 250408 + */ +public class Exercicio1 { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + for(int i = 0: i < 12; i++){ + +System.out.println("Introduza o valor da fatura "+(1 +1)); + + double valor = scanner.nextDouble(); + + soma += valor; + +} + +Double media = soma / 12; + +System.out.println("A média das faturas é " + media); + } +}