how to find quotient and remainder in c program

  • on April 21, 2020
  • Likes!

Hello Friends! Welcome to the programming shortcut and to we will run c program to find quotient and remainder and compute dividend divisor quotient remainder by this program will help you to make quotient and remainder calculator

#include<stdio.h>
#include<conio.h>
void main()
{
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”);
getch();
}
Output:
Enter two numbers : 3456
345
Quotient=10, Remainder=6

I make this programming and hope you are like the post if are you like the post you can please comment and share the post to reach more people.
If any doubt about this c programming code or input & output please comment below
If you have another question about c programming send an email by contacting us form is given on the page right side.

Share your experience about this post,
Thank You!

Article Categories:
Programs in c

Leave a Reply

Your email address will not be published. Required fields are marked *