Important C Programs

C Program to Compute Quotient and Remainder

//C Program to Compute Quotient and Remainder
//Header Files
#include<stdio.h>
#include<conio.h>

void main()
{

int dividend, divisor, quotient, remainder;
clrscr();

printf("Enter dividend: ");
scanf("%d", &dividend);

printf("Enter divisor: ");
scanf("%d", &divisor);

// Computes quotient
quotient = dividend / divisor;

// Computes remainder
remainder = dividend % divisor;

printf("Quotient = %d\n", quotient);
printf("Remainder = %d", remainder);
getch();

}

Output


You can also see a video how to run this program