SHOW:
|
|
- or go back to the newest paste.
1 | public static void main(String[] args) { | |
2 | - | double number = -5.4; |
2 | + | double nota1, nota2, media; |
3 | nota1 = 8; | |
4 | - | System.out.println(Math.abs(number)); |
4 | + | nota2 = 9; |
5 | - | System.out.println(Math.ceil(number)); |
5 | + | media = (nota1 + nota2) / 2; |
6 | - | System.out.println(Math.floor(number)); |
6 | + | |
7 | - | System.out.println(Math.rint(number)); |
7 | + | System.out.println("A média é: " + media); |
8 | - | System.out.println(Math.round(number)); |
8 | + | |
9 | } |