mahaju
Full Member level 2
#include<iostream.h>
void main()
{
int a,b,q,r;
cout<<"Enter a ";
cin>>a;
cout<<"Enter b ";
cin>>b;
q=a/b;
r=a-q*b;
cout<<"Remender="<<r;
}
Hi
How good is this method in terms of precision? Is this method applicable to all cases? Can I use this code as a function for the replacement of the % operator?
void main()
{
int a,b,q,r;
cout<<"Enter a ";
cin>>a;
cout<<"Enter b ";
cin>>b;
q=a/b;
r=a-q*b;
cout<<"Remender="<<r;
}
Hi
How good is this method in terms of precision? Is this method applicable to all cases? Can I use this code as a function for the replacement of the % operator?