An open API service indexing awesome lists of open source software.

https://github.com/ozzies-code/logc

The following program allows you to work with mathematical functions such as the calculation of the logarithm of a number. For this, the math.h library in C is used.
https://github.com/ozzies-code/logc

Last synced: 10 months ago
JSON representation

The following program allows you to work with mathematical functions such as the calculation of the logarithm of a number. For this, the math.h library in C is used.

Awesome Lists containing this project

README

          

# logC
The following program allows you to work with mathematical functions such as the calculation of the logarithm of a number. For this, the math.h library in C is used.

#include
#include
int main(int argc, char *argv[])
{
float f,x;
int x_positivo;
x_positivo = 0; /*Inicializando a falso*/

while(!x_positivo)
{
printf("\n Valor de x: ");
scanf("%f", &x);
x_positivo = (x > 0.0); /*Asigna verdadero(1) si cumple la condicion */

}

f = x*log(x);
printf(" f(%.1f) = %.3e", x,f);
printf("\n");
system("PAUSE");
return 0;
}