blob: afb7ca89cab2eb05ecf7893dea51cde8c03b7702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
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);
}
}
|