Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 11, 2018 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/643c8ff869f57a2ca1209a6b9d259525 to your computer and use it in GitHub Desktop.
Save parzibyte/643c8ff869f57a2ca1209a6b9d259525 to your computer and use it in GitHub Desktop.
Función fabs en C created by parzibyte - https://repl.it/@parzibyte/Funcion-fabs-en-C
#include <stdio.h> // printf
#include <math.h> // fabs
int main(void) {
double negativo = -40.123;
printf("El valor absoluto de %f es %f", negativo, fabs(negativo));
// El valor absoluto de -40.123000 es 40.123000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment