scanf("%d %d", &a, &b); | Get two integers from the user. |
a1 = a; b1 = b; | Store the integers in floats. |
printf("Decimal part of quotient using floats: %f\n", (a1 / b1) - (a / b)); | Calculate the decimal part of the quotient by taking the difference of the float quotient and the integer quotient. Note the %f print mask to print a floating point variable. |
printf("Integral Remainder using modulus: %d\n", a % b); |
Calculate the remainder using the modulus function. |