C Program To Find Quotient of Dividend and Divisor
Let us learn how to find quotient of a dividend and divisor in C programming language. Here, we have demonstrated different ways of calculating the quotient of a number.
What is a Quotient?
A quotient is an integer, which is achieved after you divide one number by another number. If you divide 10 by 5, the answer 2 is the quotient.
Formula To Get Quotient
Dividend / Divisor = Quotient

Note: This program to calculate quotient of a number in C programming is compiled with GNU GCC compiler and developed using gEdit Editor in Linux Ubuntu operating system.
Must Read: C Program To Print India’s Map
Method 1: C Program To Find Quotient of Dividend and Divisor
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include<stdio.h> int main() { int quotient, divisor, dividend; printf("\nEnter the Dividend:\t"); scanf("%d", ÷nd); printf("\nEnter the Divisor:\t"); scanf("%d", &divisor); quotient = dividend / divisor; printf("\nQuotient of the Number:\t%d\n", quotient); return 0; } |
Method 2: C Program To Get Quotient using Function
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_quotient(int a, int b) { int quotient; quotient = a / b; return quotient; } int main() { int result, divisor, dividend; printf("\nEnter the Dividend:\t"); scanf("%d", ÷nd); printf("\nEnter the Divisor:\t"); scanf("%d", &divisor); result = find_quotient(dividend, divisor); printf("\nQuotient of the Number:\t%d\n", result); return 0; } |
Method 3: C Program To Calculate Quotient without using Division Operator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include<stdio.h> int main() { int dividend, divisor, quotient = 0; printf("\nEnter the Dividend:\t"); scanf("%d", ÷nd); printf("\nEnter the Divisor:\t"); scanf("%d", &divisor); while(dividend >= divisor) { dividend = dividend - divisor; quotient++; } printf("\nQuotient of the Number:\t%d\n", quotient); return 0; } |
Must Read: C Program To Check Largest Digit of a Number
Output

In case you have any doubts or compilation errors in this C program for calculating quotient of a number, let us know about it in the comment section below.