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();
}

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.