Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 22:59
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/08b7b1ca5c258b87b008d14e4ea11642 to your computer and use it in GitHub Desktop.
Save parzibyte/08b7b1ca5c258b87b008d14e4ea11642 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[])
{
// La variable resultadoDeLaDivision es
// de tipo div_t
div_t resultadoDeLaDivision;
resultadoDeLaDivision = div(5, 2);
printf(
"El cociente es %d y el residuo es %d\n",
resultadoDeLaDivision.quot,
resultadoDeLaDivision.rem
);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment