Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
int main() { int a = 31; int b = 10; div_t result = div(a, b); printf("%d / %d = %d \n", a, b, result.quot); printf("Remainder: %d \n", result.rem); return 0; }
31 / 10 = 3
Remainder: 1