- 3
JOptionPane
import java.util.Scanner; import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { String question = JOptionPane.showInputDialog("la racine de 16"); Scanner in = new Scanner (System.in); int answer = in.nextInt(); do { question = JOptionPane.showInputDialog("la racine de 16"); }while(answer != 4); JOptionPane.showMessageDialog(null,"correct answer is "+answer); } }
0 Antworten