#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,q,r;
cout<<"\n Enter first number : ";
cin>>a;
cout<<"\n Enter second number : ";
cin>>b;
if(a>b)
{
q=a/b;
r=a%b;
cout<<"\n Quotient = "<<q;
cout<<"\n Remainder = "<<r;
}
else
cout<<"\n First number should be greater than second no....!!!";
getch();
}
Output

#include<conio.h>
void main()
{
clrscr();
int a,b,q,r;
cout<<"\n Enter first number : ";
cin>>a;
cout<<"\n Enter second number : ";
cin>>b;
if(a>b)
{
q=a/b;
r=a%b;
cout<<"\n Quotient = "<<q;
cout<<"\n Remainder = "<<r;
}
else
cout<<"\n First number should be greater than second no....!!!";
getch();
}
Output
No comments:
Post a Comment