compsci novice here. I am supposed to program 2 user inputted values and have them multiplied and divided without using the * and / operators.
I have figured out how to multiply but not divide...
//Multiplication
cin >> digit1;
cin >> digit2;
float product = 0;
for (int i = 0; i < digit2; i++) product = product + digit1;
cout << product << endl;
return 0;
as for division I'm not exactly sure...
cin >> digit1;
cin >> digit2;
float quotient = 0;
//Enter Division operation
cout << quotient << endl;
return 0;
Thanks for the help!