SHARE
TWEET

Untitled

a guest Apr 24th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package javaapplication4;
  2.  
  3. import javax.swing.JOptionPane;
  4.  
  5.  
  6. public class JavaApplication4 {
  7.  
  8.    
  9.     public static void main(String[] args) {
  10.     double x,y,z;
  11.     x= Integer.parseInt(JOptionPane.showInputDialog("digite el valor de su compra"));
  12.     if(x>=300 && x<=399) {
  13.         y=x*0.3;
  14.        System.out.println("El valor que debe pagar es" +y);
  15.        System.out.println("El valor que debia pagar es de:" +x);
  16.     }
  17.      if(x>=400 && x<=599) {
  18.         y=x*0.4;
  19.        System.out.println("El valor que debe pagar es" +y);
  20.        System.out.println("El valor que debia pagar es de:" +x);
  21.     }
  22.      if(x>=600 && x<=999) {
  23.         y=x*0.5;
  24.        System.out.println("El valor que debe pagar es" +y);
  25.        System.out.println("El valor que debia pagar es de:" +x);
  26.     }
  27.    
  28.    
  29.     }
  30.    
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top