/*      To read two integers a and b print the quotient and remainder
	when a is divided by b without using % operator or mod function
*/

#include<stdio.h>
main()
{
	int i,a,b;
	clrscr();
	printf("Enter the divident value\n");
	scanf("%d",&a);
	printf("Enter the divisor \n");
	scanf("%d",&b);
	for(i=0;a>b;i++)
	   a=a-b;
	    if (a==b)
		printf("remainder=0\n");
	    else
		printf("remainder=%d\n",a);
	    if (a==b)
		printf("quotient=%d\n",i+1);
	    else
		printf("quotient=%d\n",i);
	getch();
}