C Programming

C – Divide the Number and Find Quotient and Remainder.

Write a C program to divide an integer by another integer and find quotient and remainder.

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

Back to top button