google407ec42f1ae5ff0e.html Program to find quotient and remainder
top of page

Program to find quotient and remainder

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;

}


8 views0 comments

Recent Posts

See All
bottom of page