- 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); } }

12th Aug 2021, 12:13 PM
Mohammed Amine
Mohammed Amine - avatar
1 Resposta