Write function to divide two numbers wihtout using division operator
Let the two numbers be 'a' and 'b' and we want to find a/b
Code:int quotient(int a,int b){ int t = 1 ; while(b*t <= a){ t++; } return t -1 ; }
Last edited by AkkiS; 18th November 2010 at 00:16.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks