I am very new to programming and am having a problem getting started here. I know i need to use repeated subtraction inside of a loop, but i cant seem to translate it to programming. This is the source code with directions.
int main()
{
int dividend, divisor, quotient, remainder;
dividend=215
divisor=34
startHere:
//put your code here to computer the quotient and remainder
//you can assume dividend >= 0
// divisor >=1
//your code can only make use of control structures, addition, subtraction and comparison
//you may not use multiplication, division or mod operators
//do not change any label definitions
checkHere:
return 0:
}
I know i should start with:
If(dividend>=divisor)
dividend-=divisor
Then i need to incriment until i get to a remainder, but im really stuck. Any help would be appreciated