Write an assembly program to find the largest item in an array and store it in a variable named MAXIMUM. Hint: Use both Jump and loop instructions to write the program. Logic: Assume that the first item of the array is the minimum and store it in variable MAXIMUM Write a loop. Inside the loop, compare the each array item with the minimum If the array item is less than the MAXIMUM, update MAXIMUM with that array item. . Data Array WORD 10, 2, 23, 45, 21, 11 MAXIMUM WORD

Respuesta :

Use the knowledge of computational language in C++ to write the a code assembly program to find the largest item.

How to write a maximum function in C++?

To make it simpler the code is described as:

#include<bitd/stdc++.h>

Using namespace std;

Int main(){

Int arr[10]={10, 2, 23, 45, 21, 11};

Int min=INT_MAX;

Int max=INT_MIN;

for(int i=0;i<10;i++)

If(min<arr[i])min=arr[i];

for(int j=0;j<10;j++)

if(max>arr[j])max=arr[j];

Cout<<max<<” “<<min<<endl;

return 0;

See more about C++ code at brainly.com/question/19705654

Ver imagen lhmarianateixeira
ACCESS MORE