Javatpoint Logo
Javatpoint Logo

Modulus of two Float or Double Numbers

In this tutorial, we will learn how to determine the remainder of two floating-point numbers.

Examples:

C Program:

Output:

remainder(123456789.100000,1233.100000) = 50.200000
remainder(10,3) = 1.000000
remainder(10.230000,3.100000) = 0.930000

C++ Program:

Output:

0.5

To find the modulus of two floating-point values, we can utilise the built-in fmod function.

C++ Program:

Output:

0.5






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA