-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtdQ13.java
More file actions
21 lines (21 loc) · 720 Bytes
/
tdQ13.java
File metadata and controls
21 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.Scanner;
public class tdQ13 {
public static Scanner leia=new Scanner(System.in);
public static void main(String arg[]){
float valor1, valor2, valor3;
System.out.print("Digite o primeiro valor.");
valor1=leia.nextFloat();
System.out.print("Digite o segundo valor.");
valor2=leia.nextFloat();
System.out.print("Digite o terceiro valor.");
valor3=leia.nextFloat();
if ((valor2 < valor1) && (valor1 > valor3)) {
System.out.println(valor1);
}
else if ((valor1 < valor2) && (valor2 > valor3)) {
System.out.println(valor2);
} else{
System.out.println(valor3);
}
}
}