Convert the following C++ programs into Pep/9 assembly
#include
using namespace std;
void times(int& prod, int mpr, int mcand)
{
prod = 0;
while (mpr != 0)
if (mpr % 2 == 1)
prod = prod + mcand;
mpr /= 2;
mcand *= 2;
}
int main(){
int product, n, m;
cout < "enter="" two="" numbers:="">
cin >> n >> m;
times(product, n, m);
cout < "product:="" "="">< product=""><>
return 0;
Submit: Pep/9 source code along with screen capture showing it running in the Pep simulator
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here