C Program to Divide and Integer and Find the Quotient and Remainder

0
3
digitalample eye
Write a program to divide an integer by another integer and find the quotient and remainder.

C Code

#include <stdio.h>
#include <conio.h>
void main()
{
int a,b,quo,rem;
clrscr();
printf("Enter two numbers A and B:");
scanf("%d%d",&a,&b);
quo=a/b;
rem=a%b;
printf("The Quotient=%d",quo);
printf("n The Remainder=%d",rem);
getch();
}

Output

Find quotient and remainder

LEAVE A REPLY

Please enter your comment!
Please enter your name here