C Programming Code Examples C > Mathematics Code Examples C Program to Find Quotient and Remainder C Program to Find Quotient and Remainder In this program, user is asked to enter the dividend and divisor and the program then finds the quotient and remainder based on the input values. #include <stdio.h> int main(){ int number1, number2, quot, rem; printf("Enter dividend: "); scanf("%d", &number1); printf("Enter divisor: "); scanf("%d", &number2); /* The "/" Arithmetic operator returns the quotient * Here the number1 is divided by number2 and the quotient * is assigned to the variable quot */ quot = number1 / number2; /* The modulus operator "%" returns the remainder after * dividing number1 by number2. */ rem = number1 % number2; printf("Quotient is: %d\n", quot); printf("Remainder is: %d", rem); return 0; }