COSC 2325.S01 Program Eight | Complete Solution
- AceTutor
- Rating : 33
- Grade : A+
- Questions : 0
- Solutions : 823
- Blog : 1
- Earned : $26606.70
COSC 2325.S01 Program Eight
Problem:
Starting with the following C++ program (in I:\BSLATER\COSC 2325\LAB8):
#include <iostream>
using namespace std;
extern “C” long Average (long, long []);
void main ()
{
long Array1 [10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
long Array2 [11] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
long Array3 [12] = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24};
cout << "Average of Array1 is " << Average (10, Array1) << endl;
cout << "Average of Array2 is " << Average (11, Array2) << endl;
cout << "Average of Array3 is " << Average (11, Array3) << endl;
}
Write in assembly language (in a separate file named Lab8.asm) the function
Average. The first parameter is the number of elements in an array, the second is
the address of the array. The function will determine the average of the values in
the array and return the average rounded to the nearest whole number (if the
fractional part of the result is equal to or greater than .5, the result is rounded to
the next higher number.
Turn In:
1) A printed listing of the .asm file.
2) A copy of the .asm file you created. A copy of the file should be emailed to the
instructor with the subject line “COSC 2325.S01 – Lab 8”.
[Solved] COSC 2325.S01 Program Eight | Complete Solution
- This solution is not purchased yet.
- Submitted On 04 Dec, 2017 10:11:58
- AceTutor
- Rating : 33
- Grade : A+
- Questions : 0
- Solutions : 823
- Blog : 1
- Earned : $26606.70