Find quotient and remainder Program in C


/*Program to find quotient and remainder*/
#include<stdio.h>
int main(void)
{
	int x,y,quo,rem;
	printf("Enter two numbers : ");
	scanf("%d%d",&x,&y);
	if(y)  /*if y is non-zero*/
	{
		quo=x/y; 
		rem=x%y;
		printf("Quotient=%d, Remainder=%d\n",quo,rem);
	} 
	else
		printf("Divide by zero error\n");
	return 0;
}


Output:

Enter two numbers : 25
7
Quotient=3, Remainder=4
c language tutorial learn c language study c language