1
0
Files

12 lines
407 B
Java

import javax.swing.JOptionPane;
public class Task2 {
public static void main(String[] arguments) {
var rawResult = JOptionPane.showInputDialog(null, "Geben Sie eine Zahl ein:");
var input = Integer.parseInt(rawResult);
Double result = Math.sqrt(input);
JOptionPane.showMessageDialog(null, result.toString(), "Die Wurzel ist:", JOptionPane.INFORMATION_MESSAGE);
}
}