-
Lenguaje
Java usando Scanner
-
Descripción
Resuelva la siguiente ecuación: Y = 6x + 7
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 Y6X7 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double x, y;
System.out.print("Ingresa el valor de x: ");
x = in.nextDouble();
in.nextLine();
y=6.0*x+7;
System.out.println("Valor de y: " + y);
}
}
public class Y6X7 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double x, y;
System.out.print("Ingresa el valor de x: ");
x = in.nextDouble();
in.nextLine();
y=6.0*x+7;
System.out.println("Valor de y: " + y);
}
}