Convert the following C++ programs into Pep/9 assembly 1) #include using namespace std; void minimum (int i1, int i2) { if (i1 < i2) cout << i1 << " is less than " << i2 << endl; else if (i1 > i2) cout << i2 << " is less than " << i1 << endl; else cout << i1 << " equals " << i2 << endl; } int main () { int n, m; cout << "Enter two integers: "; cin >> n >> m; minimum (n, m); return 0; } Submit: Pep/9 source code along with screen capture showing it running in the Pep
Convert the following C++ programs into Pep/9 assembly
1)
#include <iostream>
using namespace std;
void minimum (int i1, int i2)
{
if (i1 < i2)
cout << i1 << " is less than " << i2 << endl;
else if (i1 > i2)
cout << i2 << " is less than " << i1 << endl;
else
cout << i1 << " equals " << i2 << endl;
}
int main ()
{
int n, m;
cout << "Enter two integers: ";
cin >> n >> m;
minimum (n, m);
return 0;
}
Submit: Pep/9 source code along with screen capture showing it running in the Pep simulator
Actually, the given information is:
1)
#include <iostream>
using namespace std;
void minimum (int i1, int i2)
{
if (i1 < i2)
cout << i1 << " is less than " << i2 << endl;
else if (i1 > i2)
cout << i2 << " is less than " << i1 << endl;
else
cout << i1 << " equals " << i2 << endl;
}
int main ()
{
int n, m;
cout << "Enter two integers: ";
cin >> n >> m;
minimum (n, m);
return 0;
}
Step by step
Solved in 2 steps