Attribute VB_Name = "Module2" Public Function divisor(A, B) If A Mod B = 0 Then divisor = True Else divisor = False End If End Function Public Function maior_de_3(x, y, z) If x >= y And x >= z Then maior_de_3 = x ElseIf y >= x And y >= z Then maior_de_3 = y Else maior_de_3 = z End If End Function Public Function horas_a_pagar(horas, minutos) If minutos = 0 Then horas_a_pagar = horas Else horas_a_pagar = horas + 1 End If End Function Public Function tarifa_normal(horas) Select Case horas Case 1, 2 tarifa_normal = 1.25 Case 3 tarifa_normal = 1.25 + 0.75 Case Else tarifa_normal = 1.25 + 0.75 + (horas - 3) End Select End Function Public Function tarifa_especial(horas) Select Case horas Case 1, 2, 3 tarifa_especial = 1.25 Case Else tarifa_especial = 1.25 + (horas - 3) End Select End Function Public Function preco_a_pagar(tipo, horas) If tipo = "normal" Then preco_a_pagar = tarifa_normal(horas) ElseIf tipo = "especial" Then preco_a_pagar = tarifa_especial(horas) Else preco_a_pagar = -1 End If End Function Public Function liquido(ord_iliq) i_selo = 0.4 * ord_iliq s_social = 0.13 * ord_iliq Select Case ord_iliq Case 0 - 250 irs = 0 Case 250.01 - 350 irs = 0.04 * ord_iliq Case 350.01 - 499 irs = 0.09 * ord_iliq Case 499.01 - 998 irs = 0.17 * ord_iliq Case Else irs = 0.23 * ord_iliq End Select liquido = ord_iliq - i_selo - s_social - irs End Function