1 / 5

Problema #3

Problema #3.

fay-barr
Download Presentation

Problema #3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Problema #3 • Escriba un pseudocódigo para calcular el salario neto de un empleado. Se entra las horas trabajadas y el salario por hora, para calcular el salario bruto, el impuesto sobre la renta (ISR), el impuesto de educativo (1.25%), el impuesto a caja de seguro social (7.25%) y el salario neto. De a conocer toda la información. Tabla de ISR a utilizar

  2. Pseudocódigo Clase Salario /*Declaración de datos*/ Privado flotante sal_hora, hor_trabajadas /*Métodos*/ Publico asignar_valores (flotante sa, flotante ht) {sal_hora=sa Hor_trabajadas=ht} Publico flotante calcular_sb() {flotante sb Sb=sa*ht Retornar sb} Publico flotante.calcular_sn() {flotante sn Sn=(sa*ht)-((sa*ht)*IE)+((sa*ht)*ISS)+((sa*ht)*ISR)) Retornarsn } Si (sb<=11 000) Entonces ISR=0% De otro modo Si (11 000<sb50 000) Entonces ISR=15% De otro modo Si (sb>50 000) Entonces ISR=36.7%

  3. /*Definición del cuerpo principal del algoritmo*/ INICIO IE=1.25% ISS=7.25% Flotante sa,ht,res /*Se crea el objeto de la clase*/ Salario obj_salb /*Crear el objeto con valores leídos*/ Imprimir (“Introduzca el salario por hora”) Leer (sa) Imprimir (“Introduzca la cantidad de horas trabajadas”) Leer (ht) Obj_salb.asignar_valores(sa,ht) Res=obj_salb.calcular_sb() Imprimir (“El salario bruto es: “,sb) Salario obj_saln Obj_saln.asignar_valores(sa,ht) Res=obj_saln.calcular_sn() /*Impresión de salida*/ Imprimir (“El salario neto es: “,sn) FIN

  4. Prueba de Escritorio

  5. Materiales a Utilizar

More Related