-3
When rotating the following code:
package Aula_4;
import java.util.Scanner;
public class Exercício_3 {
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
float n1,n2,n3,n4;
System.out.println("Digite a largura da parede");
n1 = entrada.nextFloat();
System.out.println("Digite o comprimento da parede");
n2 = entrada.nextFloat();
System.out.println("Sua parede tem " +n1*n2+ "m²");
System.out.println("Agora digite a largura do tijolo");
n3 = entrada.nextFloat();
System.out.println("Digite o Comprimento do tijolo");
n4 = entrada.nextFloat();
System.out.println("Para esta parede você irá precisar de aproximadamente " +(n1*n2*100) / (n3*n4*100));
The result shown is 93.13502, as round to 93,1?
I don’t understand why someone goes to class (in this case, Lesson 4 :) and doesn’t ask the teacher.
– epx
This answers your question? Double formatting in Java
– hkotsubo