C++ Program to find the Quotient value without using modulus operator


#include<iostream> using namespace std; int main(){ int x,y,c=0; cout<<"Enter two number :"<<endl; cin>>x>>y; while(x>=y){ x=x-y; c++; } cout<<"The Quotient value is :"<<c; return 0; }

Output:-

Enter two number :5  2
The Quotient value is :2