All pastes #365409 Raw Edit

Miscellany

public text v1 · immutable
#365409 ·published 2007-02-20 22:50 UTC
rendered paste body
/*
 * opdrachtP2punt4.java
 *
 * Created on 20 februari 2007, 23:02
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package opdrachten;
import javax.swing.JOptionPane ;
/**
 *
 * @author Administrator
 */
public class opdrachtP2punt4 {
    
    /** Creates a new instance of opdrachtP2punt4 */
           public static void main(String[] args){
        
     String intCijfer1 = 
           JOptionPane.showInputDialog(null,
           "Leeftijd: ",
           "Opdracht P2.4",
           JOptionPane.QUESTION_MESSAGE);
             

   
   int cijfer1 = Integer.parseInt(intCijfer1);
 
        
       
    double prijs = 12.00;
    
  
    if(cijfer1 >= 55) {
     
     JOptionPane.showMessageDialog(null, "Gratis entree voor u!", "opdrachtP2punt4", JOptionPane.INFORMATION_MESSAGE);
    }
    else if(cijfer1 <= 54){
      JOptionPane.showMessageDialog(null, "U betaald f " +prijs, "opdrachtP2punt4", JOptionPane.INFORMATION_MESSAGE);
    }
      else if(cijfer1 <= 12){
       JOptionPane.showMessageDialog(null, "U betaald: " + (prijs / 2.0), "opdrachtP2punt4", JOptionPane.INFORMATION_MESSAGE);
      }
         else if(cijfer1 <=5){
        JOptionPane.showMessageDialog(null, "Gratis entree voor u!", "opdrachtP2punt4", JOptionPane.INFORMATION_MESSAGE);
        }
           
     System.exit(0); 
   }
}