Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JOptionPane;
- public class kolmeyksi
- {
- public static void main(String [] args)
- {
- String normaaliHinta = JOptionPane.showInputDialog("Syötä normaalihinta: ");
- double normaaliHintaDouble = Double.parseDouble(normaaliHinta);
- String alennus = JOptionPane.showInputDialog("Syötä alennusprosentti: ");
- double alennusDouble = Double.parseDouble(alennus);
- double aleHinta = Double.parseDouble(alennusDouble*normaaliHintaDouble);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement