Write an assembly language program that corresponds to the following C++ program
ID: 3546895 • Letter: W
Question
- Write an assembly language program that corresponds to the following C++ program:
#include <iostream>
using namespace std;
const int amount = 20000;
int num;
int sum;
int main () {
cin >> num;
sum = numb + amount;
cout << "sum = " ,<< sum << endl;
return 0; } -
- Test the program in the previous question twice. The first time, enter a value for num to make the sum within the allowed range for the Pep/8 computer. The second time, enter a value that is in range but that makes sum outside the range. Not that the out-of-range condition does not cause an error message, but just gives an incorrect value. Explain the value.
- Test the program in the previous question twice. The first time, enter a value for num to make the sum within the allowed range for the Pep/8 computer. The second time, enter a value that is in range but that makes sum outside the range. Not that the out-of-range condition does not cause an error message, but just gives an incorrect value. Explain the value.
#include <iostream>
using namespace std;
const int amount = 20000;
int num;
int sum;
int main () {
cin >> num;
sum = numb + amount;
cout << "sum = " ,<< sum << endl;
return 0; } Write an assembly language program that corresponds to the following C++ program:
#include <iostream>
using namespace std;
const int amount = 20000;
int num;
int sum;
int main () {
cin >> num;
sum = numb + amount;
cout << "sum = " ,<< sum << endl;
return 0; } cin >> num;
sum = numb + amount;
cout << "sum = " ,<< sum << endl;
return 0;
- Test the program in the previous question twice. The first time, enter a value for num to make the sum within the allowed range for the Pep/8 computer. The second time, enter a value that is in range but that makes sum outside the range. Not that the out-of-range condition does not cause an error message, but just gives an incorrect value. Explain the value.
Test the program in the previous question twice. The first time, enter a value for num to make the sum within the allowed range for the Pep/8 computer. The second time, enter a value that is in range but that makes sum outside the range. Not that the out-of-range condition does not cause an error message, but just gives an incorrect value. Explain the value.
Explanation / Answer
I think there are sum errors in the code posted the correct code would be: #include using namespace std; const int amount = 20000; int num; int sum; int main () { cin >> num; sum = num + amount; std::coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.