What the final value of the variable sum e was

Assignment Help C/C++ Programming
Reference no: EM131015267

part 1: Implement the following C++ code fragment in assembly language. Use the block-structured .IF and.WHILE directives. Assume that all variables are 32-bit integers.

int array[] = {3,1,4,1,5,9,2,6, 5,3,5,8,9,7,9,3,2,3,8,4};
int lower = 3;
int upper = 8;
int ArraySize = sizeof array / sizeof lower;
int index = 0;
int sum = 0;
while( index < ArraySize )
{
if( array[index] >= lower && array[index] <= upper )
{
sum += array[index];
}
index++;
}

Your assembly language program must also display as output the number of times a member of ' array 'e qualified for inclusion into the 'sum 'e and what the final value of the variable ' sum 'e was.

Part 2: Write a program that asks the user to enter an integer dollar amount between 1 and 5,000. Your program should display the corresponding class description using the following table. Write the program so that it executes until the user inputs some value that you determine to be the "stop value". Your program must guard against and provide user messages for input values that are outside the valid range.

Donation Amount (dollars)

Class of Donation

$4,000 to $5,000

Platinum

$3,000 to $3,999

Gold

$2,000 to $2,999

Silver

$1,000 to $1,999

Bronze

$1 to $999

Copper

Reference no: EM131015267

Questions Cloud

Gain or loss did bogus recognize on the exchange : What gain or loss did Bogus recognize on the exchange, assuming no commercial substance 48,600 loss 24,000 gain 0 gain/loss none of the above
Compute the amount of goodwill acquired by winans : At the time of purchase, Aumont's balance sheet showed assets of $611,070, liabilities of $201,660, and owners' equity of $409,410. The fair value of Aumont's assets is estimated to be $819,560. Compute the amount of goodwill acquired by Winans.
What is the total amount of debt : forfeitures of benefits under the plan may be reallocated to the remaining participantsthe company must make contributions to the plan if it has profits during the year.
Description of the community you selected : description 2 Pagea description of the community you selected (New York, or Any American Urban City). Then, explain the strengths and challenges associated with that community based on its characteristics. Finally, explain how you, as a social wor..
What the final value of the variable sum e was : Write a program that asks the user to enter an integer dollar amount between 1 and 5,000. Your program should display the corresponding class description using the following table. Write the program so that it executes until the user inputs some v..
Types of natural and man-made disasters and attacks : What type of natural hazard do you think is the most significant or troublesome to emergency managers - what type of man-made hazard do you think is the most significant or troublesome to emergency managers? Why?
Was the study design cross-sectional or longitudinal : What were the units of analysis? Were they appropriate for the research question? Was the study design cross-sectional or longitudinal? Was a sample or the entire population of elements used in the study? What type of sample was selected
Activity rate for product design activity cost pool : What is the activity rate for the Product Design activity cost pool? Product design activity cost pool $ per product
Predominantly substantive approach : Which of the following audit strategies would be most appropriate when an auditor has assessed a predominantly substantive approach is necessary to determine inventory quantity?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program to compute with two numbers.

I have the 1st two statements figured out, and had the arithmetic figured out based on results of 22 and 16, but turns out I interpreted it wrong and results should be what's posted above when the user changes the two numbers. The tutorial says no..

  An array-based queue for bcs registration

objective of this assignment is to use C++ to queue studentsinto an array-based queue for BCS registration. Students have the option of taking five different courses, but each course can only hold 8 students.

  Write some code that puts a zero in every element of q

Given a two-dimensional array of integers named q, with 2 rows and 4 columns, write some code that puts a zero in every element of q. Declare any variables needed to help you.

  How do you generate arrays, random numbers

How do you generate arrays, random numbers and multiply and add rows, columns and diagonals in C

  Explain in a one to two 1-2 page narrative a use case

as an intern software developer for a retail bank you have been tasked with developing use cases to support the atm

  Prepare a a simple class fraction

Web tickets are purchased on the internet. Web tickets purchased a week in advance of the event are £30 and those purchased less than a week in advance are £40.

  Weather balloons are used to gather temperature

Weather balloons are used to gather temperature and pressure data at various altitudes in the atmosphere.  The balloon rises because the density of the helium in the balloon is less than the density of the surrounding air outside the balloon.  As the..

  Consider the following main function

Consider the following main function:Which of the following is an object of a template class?

  The big picturethis assignment consists of two separate

the big picturethis assignment consists of two separate programming tasks.1. you will create a linked list module that

  Write a c++ statement that multiplies the value

Write a program that prompts the user to input a decimal number and outputs the number rounded to the nearest integer.

  Mark the following statements as true or false

Mark the following statements as true or false.

  Write program which inputs number of winning coupons

Write a program which inputs number of coupons you win and outputs how many candy bars and gumballs you can get if you spend all off your coupons on candy bars first and remaining coupons on gumballs in c++.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd