Ejercicio Java Neatbeans.docx

  • Uploaded by: Cien Rojas
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ejercicio Java Neatbeans.docx as PDF for free.

More details

  • Words: 147
  • Pages: 2
package ejercicio19; import javax.swing.*; public class Ejercicio19 { public static void main(String[] args) { double pc=0.1,sb1,sb2,sb3,v1,v2,v3,c1,c2,c3,st1 = 0,st2 = 0,st3 = 0,i=0,otro=0,pt; int vendedor; do{ vendedor=Integer.parseInt(JOptionPane.showInputDialog("1. Vendedor 1\n2.Vendedor 2\n3.Vendedor 3")); switch (vendedor) { case 1: JOptionPane.showMessageDialog(null,"Ud es el vendedor 1"); sb1=Float.parseFloat(JOptionPane.showInputDialog("Digite su sueldo basico")); v1=Float.parseFloat(JOptionPane.showInputDialog("cuantas ventas realizo durante el mes")); c1=((sb1*pc)*v1); st1=(sb1+c1); break; case 2: JOptionPane.showMessageDialog(null,"Ud es el vendedor 2"); sb2=Float.parseFloat(JOptionPane.showInputDialog("Digite su sueldo basico")); v2=Float.parseFloat(JOptionPane.showInputDialog("cuantas ventas realizo durante el mes")); c2=((sb2*pc)*v2); st2=(sb2+c2); break; case 3: JOptionPane.showMessageDialog(null,"Ud es el vendedor 3"); sb3=Float.parseFloat(JOptionPane.showInputDialog("Digite su sueldo basico")); v3=Float.parseFloat(JOptionPane.showInputDialog("cuantas ventas realizo durante el mes")); c3=((sb3*pc)*v3);

st3=(sb3+c3); break; } otro=Float.parseFloat(JOptionPane.showInputDialog("Desea ingresar otro trabajador\n 0=Si\n1=No")); i++; }while(otro==0); pt=(st1+st2+st3); JOptionPane.showMessageDialog(null,"El total a pagar al vendedor 1 es =$ " +st1); JOptionPane.showMessageDialog(null,"El total a pagar al vendedor 2 es =$ " +st2); JOptionPane.showMessageDialog(null,"El total a pagar al vendedor 3 es =$ " +st3); JOptionPane.showMessageDialog(null,"Total a pagar por los 3 es =$ " +pt); } }

Related Documents

Ejercicio
May 2020 47
Ejercicio
May 2020 50
Ejercicio
December 2019 79
Ejercicio
November 2019 84

More Documents from ""

November 2019 14
November 2019 16
November 2019 16