# Find Remainder C Program

## C Program To Find Remainder of Dividend and Divisor

Learn How To Find Remainder of a Dividend and Divisor in C Programming Language. Here, we have demonstrated different ways of calculating the Remainder of a Number.

#### What is a Remainder?

A Remainder is an Integer that is achieved after dividing Two Integers with each other, producing a Quotient too. The remainder will get more clear from the below given image. When you divide 11 by 3, you multiply 3 with 3 and the remainder becomes **2** since **(11 – (3*3)) = 2**.

#### Formula To Get Remainder

Dividend = Divisor × Quotient + Remainder

**Must Read: C Program To Find GCD of Two Integers**

#### Method 1: C Program To Find Remainder of Dividend and Divisor

1 2 3 4 5 6 7 8 9 10 11 12 13 | #include<stdio.h> int main() { int remainder, divisor, dividend; printf("\nEnter the Dividend:\t"); scanf("%d", ÷nd); printf("\nEnter the Divisor:\t"); scanf("%d", &divisor); remainder = dividend % divisor; printf("\nRemainder of the Number:\t%d\n", remainder); return 0; } |

#### Method 2: C Program To Calculate Remainder without using Modulus Operator

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include<stdio.h> int main() { int remainder, divisor, dividend; printf("\nEnter the Dividend:\t"); scanf("%d", ÷nd); printf("\nEnter the Divisor:\t"); scanf("%d", &divisor); remainder = dividend / divisor; remainder = remainder * divisor; divisor = dividend - remainder; printf("\nRemainder of the Number:\t%d\n", divisor); return 0; } |

#### Method 3: C Program To Get Remainder using Functions

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include<stdio.h> int find_remainder(int a, int b) { int remainder; remainder = a % b; return remainder; } int main() { int result, divisor, dividend; printf("\nEnter the Dividend:\t"); scanf("%d", ÷nd); printf("\nEnter the Divisor:\t"); scanf("%d", &divisor); result = find_remainder(dividend, divisor); printf("\nRemainder of the Number:\t%d\n", result); return 0; } |

**Must Read: C Program To Find Leap Year**

#### Output

In case you get any Compilation Errors or any doubts in this C Program for Calculating Remainder of a Number, let us know about it in the Comment Section below.

I was confused with Divisor and Dividend Numbers. Your image above has simplified to understand both of them. 🙂