Comit inicial

master
250412 2025-11-13 16:08:21 +00:00
parent 67c0affe14
commit c3a9e025bf
1 changed files with 20 additions and 11 deletions

View File

@ -13,17 +13,26 @@ import java.util.Scanner;
public class Ex1 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double soma = 1;
for(int i = 0 ; i < 12 ; i++){
System.out.println("<s <introduza o valor da fatura "+ (i+1));
double valor = scanner.nextDouble();
soma += valor ;
/***************************************************
* *
* Ex 12 *
* *
/***************************************************
*/
}
double media = soma / 12;
System.out.println("A média das faturas " + media);
// Scanner scanner = new Scanner(System.in);
// double soma = 1;
// for(int i = 0 ; i < 12 ; i++){
//
// System.out.println("<s <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);
//}
}
}