C++ Program to find quotient and remainder of two numbers

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int a,b,q,r;
cout<<“Enter two numbers:”;
cin>>a>>b;

if(a>b)
{
q=a/b;
r=a%b;
cout<<“nQuotient=”<<q;
cout<<“nRemainder=”<<r;
}
else
cout<<“nFirst no. should be greater than second no….!!!”;

getch();
}

1 thought on “C++ Program to find quotient and remainder of two numbers”

Leave a Comment

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