Вы находитесь на странице: 1из 1

package quiz;

import java.util.jar.Attributes.Name;

import javax.swing.*;

/**

* @author

*/

public class Quiz {

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

// TODO code application logic here

String Name = JOptionPane.showInputDialog("Enter Your Name..");

int age = Integer.parseInt(JOptionPane.showInputDialog("Enter Your Age..."));

float gpa = Float.parseFloat(JOptionPane.showInputDialog("Enter your GPA"));

JOptionPane.showMessageDialog(null,"Your Name is:"+ Name);

JOptionPane.showMessageDialog(null, "Your age is:" + age);

JOptionPane.showMessageDialog(null, "Your GPA is:"+ gpa);

System.exit(0);

Вам также может понравиться