Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4: Write a 64-bit x86-64 assembly language program that given a collection of N numbers will find the largest value, the frequency of the

Question 4: Write a 64-bit x86-64 assembly language program that given a collection of N numbers will find the largest value, the frequency of the largest value (i.e., the number of times the largest value appears in the collection), and the average of the N numbers.

Get the value of N from the user.

If N

Read the values as entered from the user. (If N =5, then there are 5 values the user is going to enter).

Find the Largest, the frequency of the largest value, and the average of these N values.

Hint: To find the largest value, read the first value before the loop then assume that this first value entered by the user is the largest value and its frequency is 1. Within the loop compare the assumed largest value with other values read inside the loop and change the largest value and frequency accordingly.

Note: Your solution must not use arrays and data files.

Sample program run:

image text in transcribed

Enter how many values to consider: 6 Enter value 1: 12.5 Enter value 2: 50.0 Enter value 3: 3.0 Enter value 4: 50.0 Enter value 5: 45.0 Enter value 6: 50.0 Largest value -50.00 The frequency of the largest value3 Average35.08

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Please solve this

Answered: 1 week ago