Discussion:
[R-es] solucionado simple suma y multiplicacion
David Montes
2018-11-06 15:35:33 UTC
Permalink
#suma
mi_funcion = function(x, y, operacion = "suma")
{
if(operacion == "suma")
{
return (x + a) = y
} else {

print ("x + a") = y

#multiplica
mi_funcion2 = function(x, y, operacion = "multiplicacion")
if(operacion == "multiplicacion")
{
return (x * w )+a = y

} else {

print ("(x*w)+a = y")
}
a=2
x=1
w=1
y=3


[[alternative HTML version deleted]]

Loading...