You can use the fmod
function from the standard math library. Its prototype is in the standard header <math.h>
.
More Related Contents:
- Not able to calculate in C.How do you calculate in C?
- Sum of the all the numbers between a and b [closed]
- The most efficient way to implement an integer based power function pow(int, int)
- What’s the difference between “mod” and “remainder”?
- Rounding integer division (instead of truncating)
- Undefined reference to `sin` [duplicate]
- How do I determine the number of digits of an integer in C?
- Divide a number by 3 without using *, /, +, -, % operators
- Power by squaring for negative exponents
- Explain this snippet which finds the maximum of two integers without using if-else or any other comparison operator?
- “undefined reference to `pow'” even with math.h and the library link -lm [duplicate]
- Using M_PI with C89 standard
- How do you print the EXACT value of a floating point number?
- Representing integers in doubles
- Compute fast log base 2 ceiling
- How to concatenate two integers in C
- Are floating point operations in C associative?
- C – How to implement Set data structure?
- Gaussian elimination without result for acceleration
- C: how to break apart a multi digit number into separate variables?
- Why does gdb evaluate sqrt(3) to 0?
- To the power of in C? [duplicate]
- sin, cos, tan and rounding error
- How does this bitwise operation check for a power of 2?
- log2 not found in my math.h?
- Intersection of two lines defined in (rho/theta ) parameterization
- Evaluate Mathematical Function from String [closed]
- Conditional tests in primality by trial division
- How sqrt() of GCC works after compiled? Which method of root is used? Newton-Raphson?
- Algorithm to pick values from array that sum closest to a target value?