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.
- Host: GitHub
- URL: https://github.com/ozzies-code/logc
- Owner: ozzies-code
- Created: 2023-07-30T22:22:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-30T22:28:45.000Z (over 2 years ago)
- Last Synced: 2025-01-21T12:13:10.629Z (12 months ago)
- Language: C
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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;
}