-
Lenguaje
Java usando Scanner
-
Descripción
Leer el valor de X y a partir de él hallar el valor de W que se calcula a partir de la expresión:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.util.Scanner;
public class ValorDeW {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double W, x;
System.out.print("Ingresa el valor de x: ");
x = in.nextDouble();
in.nextLine();
W=Math.pow(x*x+4.0*x/(x-3),4.0/5.0)+x*x;
System.out.println("Valor de W: " + W);
}
}
public class ValorDeW {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double W, x;
System.out.print("Ingresa el valor de x: ");
x = in.nextDouble();
in.nextLine();
W=Math.pow(x*x+4.0*x/(x-3),4.0/5.0)+x*x;
System.out.println("Valor de W: " + W);
}
}