UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 27 de mayo de 2015

OBRERO-EMPLEADO





/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tienda_obrero_empleado;
import java.io.*;

public class TIENDA_OBRERO_EMPLEADO {

    
    public static void main(String[] args) throws IOException{
              

  int ti, tr;
         double importe, impuesto, monto, pago;      
  BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Ingresar Trabajador: Obrero(0), Empleado(1) ");
  tr=Integer.parseInt(in.readLine());
System.out.println("Ingresar Tienda: A(0), B(1) ");
    ti=Integer.parseInt(in.readLine());
System.out.println("Ingresar Monto: ");
      monto=(double)Float.parseFloat(in.readLine());
importe=(double)Float.parseFloat(in.readLine());


switch(tr)

{

case 0:
    switch (ti)
       {
        case 0: importe=0.8*monto;
        
        
        break;
        case 1: importe=0.9*monto;
       
     break;   
    }
    break;

    case 1:
    
    switch (ti)
    {
        case 0: importe=0.7*monto;
        
        
        break;
        case 1: importe=0.85*monto;
        
      break;  
    }

    default:
   System.out.println("Error, vuelva a ingresar 0 ó 1: ");
break;
}

impuesto=0.18*importe;
pago=1.18*importe;                 

      
System.out.println("El Importe a pagar es: "+importe); 
System.out.println("El Impuesto a pagar es: "+impuesto); 
System.out.println("El Pago total es: "+pago); 


   
    }
}

DIA DE LA SEMANA




/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dia.de.la.semana;
import java.util.Scanner;
/**
 *

 */
public class DiaDeLaSemana {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    int n; String m="";
System.out.println("Ingresar un número del 1 al 7" );
Scanner teclado=new Scanner(System.in);
n=teclado.nextInt();


if(n==1){
m="DOMINGO";
System.out.println("EL DÍA DE LA SEMANA ES: "+m);}

if(n==2){
m="LUNES";
System.out.println("EL DÍA DE LA SEMANA ES: "+m);}

if(n==3){
m="MARTES";
System.out.println("EL DÍA DE LA SEMANA ES: "+m);}

if(n==4){
m="MIERCOLES";
System.out.println("EL DÍA DE LA SEMANA ES: "+m);}

if(n==5){
m="JUEVES";
System.out.println("EL DÍA DE LA SEMANA ES: "+m);}

if(n==6){
m="VIERNES";
System.out.println("EL DÍA DE LA SEMANA ES: "+m);}

if(n==7){
m="SABADO";

System.out.println("EL DÍA DE LA SEMANA ES: "+m);}
if (n<1)
    
{System.out.println("NÚMERO DE SEMANA ES INCORRECTO");}
  
if (n>7)
{System.out.println("NÚMERO DE SEMANA ES INCORRECTO");}

  

    }
}

PRECIO A PAGAR



/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package precio.a.pagar;
import java.util.Scanner;
/**
 *

 */
public class PRECIOAPAGAR {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
      
  int cali, produc, precio;
  
   Scanner teclado = new Scanner(System.in);     
 System.out.println("Ingrese Producto: ");
 produc=teclado.nextInt();

 System.out.println("Ingrese Calidad: ");
cali=teclado.nextInt();

 if(produc==1&&cali==1)
 {precio=5000;
 System.out.println("El precio es: " +precio);}
 else

     if(produc==1&&cali==2)
     {precio=4500;
     System.out.println("El precio es: " +precio);}
             
    else
     if(produc==1&&cali==3)
     {precio=4000;
     System.out.println("El precio es: " +precio);}
     
     else
     if(produc==2&&cali==1)
     {precio=4500;
     System.out.println("El precio es: " +precio);}
     
     else
     if(produc==2&&cali==2)
     {precio=4000;
     System.out.println("El precio es: " +precio);}

     else
     if(produc==2&&cali==3)
     {precio=3500;
     System.out.println("El precio es: " +precio);}
     
     else
     if(produc==3&&cali==1)
     {precio=4000;
     System.out.println("El precio es: " +precio);}
     
        else
     if(produc==3&&cali==2)
     {precio=3500;
     System.out.println("El precio es: " +precio);}
     
     else
     if(produc==3&&cali==3)
     {precio=3000;
     System.out.println("El precio es: " +precio);}
         
     else
     {System.out.println("Producto y/o Calidad equivocado...");}    
    
         
   
}
}