import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner tec = new Scanner (System.in);
System.out.println("Que programa vols executar?(Hipotenusa,)");
String Programa = 0;
Programa = tec.nextString;
switch Programa{
Case Hipotenusa:
System.out.print("Escribe el primer cateto: ");
double Cateto_1 = tec.nextDouble;
System.out.print("Escribe el segundo cateto: ");
double Cateto_2 = tec.nextDouble;
double Hipotenusa = math.sqrt (math.pow (Cateto_1)+ math.pow (Cateto_2));
System.out.println ("La hipotenusa es igual a "+Hipotenusa);
default:
System.out.println ("Escribe un formato correcto");
}
System.out.println("");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: