Convert the following C++ program to pep9/Assembly languageBR Mainformatnotmachine language
#include using namespace std;int times(int mpr, int mcand){int prod = 0;while (mpr != 0){if (mpr % 2 == 1)prod = prod + mcand;mpr /= 2;mcand *= 2;}return prod;}int main(){int n, m;cout < "enter="" two="" numbers:="">cin >> n >> m;cout < "product:="" "="">< times(n,="" m)=""><>return 0;}
int times(int mpr, int mcand){int prod = 0;while (mpr != 0){if (mpr % 2 == 1)prod = prod + mcand;mpr /= 2;mcand *= 2;}
return prod;}
int main(){
int n, m;
cout < "enter="" two="" numbers:="">cin >> n >> m;
cout < "product:="" "="">< times(n,="" m)=""><>
return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here