Home » C Programs » C Program to Compute Quotient and Remainder

C Program to Compute Quotient and Remainder

Simple c program to compute quotient and remainder in a programming language for beginners to understand and perform quotient and remainder in c.

Dividend Definition

A dividend is a distribution of a portion of a company’s earnings to a class of shareholders chosen by the board of directors of the firm. As long as they own the shares before the ex-dividend date, common shareholders of dividend-paying firms are usually eligible.

Quotient Definition

The dividend is the number that is being divided, and the divisor is the number by which it is being divided. The quotient is the outcome of division. The quotient is the outcome of division. The remainder is the amount that is left over. The rest is a portion of the end result.

C Program to Compute Quotient and Remainder

//c program to compute quotient and remainder 
#include <stdio.h>
int main() 
{
int dividend, divisor, quotient, balance;
printf("Enter dividend");
scanf("%d", &dividend);
printf("Enter divisor");
scanf("%d", &divisor);
quotient = dividend / divisor;
balance = dividend % divisor;
printf("Quotient = %d\n", quotient);
printf("balance = %d", balance);
}

Output:

Enter dividend45
Enter divisor6
Quotient = 7
balance = 3