Skip to content

Instantly share code, notes, and snippets.

@hyperion0201
Created September 5, 2017 06:59
Show Gist options
  • Save hyperion0201/d2e7ee7c783ac9b00ff83a674ed71f56 to your computer and use it in GitHub Desktop.
Save hyperion0201/d2e7ee7c783ac9b00ff83a674ed71f56 to your computer and use it in GitHub Desktop.
Troll height estimated
import java.util.*;
import javax.swing.*;
class Height {
public static void main(String[] args) {
JFrame myFrame = new JFrame();
myFrame.setSize(500, 300);
myFrame.setTitle("Ung dung do chieu cao cua ban ");
myFrame.setVisible(true);
myFrame.getIconImage();
String str = JOptionPane.showInputDialog(myFrame, "Nhap vao chieu cao cua ban (cm) : ");
int a = Integer.parseInt(str);
JOptionPane.showMessageDialog(myFrame, "Chieu cao cua ban la : " + a + "cm");
JOptionPane.showMessageDialog(myFrame, "Va chung toi goi day la : CHAT TOI TUNG XENTIMET");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment