Divide Two Numbers without Using Divide Operator


                         Divide Two Numbers without Using Divide Operator in C++




#include<iostream>
using namespace std;
main()
{
int a,b,c=0;
cout<<"Enter Two numbers ";
cin>>a>>b;
while(a>=b)
{
a=a-b;
c++;
}
cout<<c;
}
SHARE
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment