Computers and Technology, 28.08.2020 19:01 tejasheree
Take the following program and translate it into PEP/9 assembly language: #include using namespace std;
int theArray[] = { 5, 11, -29, 45, 9, -1};
void sumPos(int ary[], int len, int β)
{
sum = 0;
for (int i = 0; i < len; i++)
if (ary[i] > 0)
sum = sum + ary[i];
}
int main()
{
int total;
sumPos(theArray, 6, total);
for (int k=0; k < 6; k++)
cout << theArray[k] << endl;
cout << "Positive sum is " << total << endl;
return 0;
}
You must use equates to access the stack and the index register in accessing the array. Remember, the sumPos array does NOT know about the global "theArray" β the address of the array must be passed via the parameter.
Also the extra to make theArray a local array in main.
Answers: 1
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
Computers and Technology, 24.06.2019 13:30
Which type of excel chart should be used to track studentsβ progress on test grades? line column bar pie
Answers: 2
Take the following program and translate it into PEP/9 assembly language: #include using namespace s...
English, 26.02.2021 03:20
Mathematics, 26.02.2021 03:20
Mathematics, 26.02.2021 03:20
Engineering, 26.02.2021 03:20
Mathematics, 26.02.2021 03:20
Chemistry, 26.02.2021 03:20
English, 26.02.2021 03:20
Mathematics, 26.02.2021 03:20
Biology, 26.02.2021 03:20
Mathematics, 26.02.2021 03:20
Mathematics, 26.02.2021 03:20