Op Avanzadas- Racionales c#

public static double Porcentaje(double x, double y)
{
double por = (x / 100) * y;
return por;
}


public static double Potencia(double x, double y)
{
double pot = Math.Pow(x, y);
return pot;
}


public static double Logaritmo(double x, double y)
{
if (x < 0 || y < 0)
{
throw new SystemException();
}else
{
double log = Math.Log(x, y);
return log;
}
}


public static double Seno(double x)
{
double sen = Math.Sin(x);
return sen;
}


public static double Coseno(double x)
{
double cos = Math.Cos(x);
return cos;
}


public static double Tangente(double x)
{
double tan = Math.Tan(x);
return tan;
}

No hay comentarios:

Publicar un comentario