hi friends
is there any way to get remainder for flaoating variables in C programming??

Recommended Answers

The same way you'd do it on paper.

Jump to Post

All 2 Replies

The same way you'd do it on paper.

Have you tried using fmod() or fmodf() from <math.h>? Or better yet, use <tgmath.h> as suggested here: Click Here

If you are simply using 2 integers then use the modulo operator (%).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.