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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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