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

Leave a Reply

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