Created
September 21, 2013 00:05
-
-
Save angelsystem/6645522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding : UTF-8 | |
def credito(monto, tasa, nombre, ruc) | |
puts "El monto maximo sera de " + monto.to_s | |
puts "La tasa sera de " + tasa.to_s | |
puts nombre | |
puts ruc | |
end | |
puts "Ingrese la razón social" | |
nombre = gets.chomp | |
puts "Ingrese el RUC de la empresa" | |
ruc = gets.chomp.to_i | |
puts "Elige el Producto Financiero" | |
puts "1:Capital de Trabajo" | |
puts "2:Préstamo para maquinaria" | |
puts "3:Préstamo para terrenos" | |
producto = gets.chomp.to_i | |
puts "Elige el Tipo de Giro" | |
puts "1:Producción" | |
puts "2:Servicios" | |
giro = gets.chomp.to_i | |
puts "Ingrese los años de constitucion de la empresa" | |
ano = gets.chomp.to_i | |
if 4 >= ano.to_i | |
tasa = "23%" | |
monto = "3000" | |
else | |
tasa = "21%" | |
monto = "5000" | |
end | |
if 3 >= ano.to_i | |
tasa = "25%" | |
monto = "12000" | |
else | |
tasa = "22%" | |
monto = "10000" | |
end | |
if (( 2 <= ano.to_i ) && ( ano.to_i <= 6 )) | |
tasa = "24%" | |
monto = "20000" | |
else | |
tea = "25%" | |
monto = "15000" | |
end | |
puts credito(monto, tasa, nombre, ruc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment