Change the following C++ functions to Assembly x86:
int problem1_ ( )
{
int numberArray [3] = {1, -2, 15 };
int result = 0, index = 0;
int numElements = 3;
while (index < numElements)
{
if ( index >= 1 && numberArray[index] > 3 )
{
result += numberArray[index] ;
}
else
{
result -= 3;
}
index++;
}
return result;
}
int problem2_ ( )
{
int a, modulo
int answer = 0, b = 3;
for ( a = 5; a > 0; a-- )
{
if ( ( a % 4 == 0 ) || ( a % 4 == 3) )
{
answer += b ;
}
else
{
answer *= 2;
}
}
return answer;
}
In: Computer Science
Please let me know how to make code sort.
If you put sort (sort 1000 6 5 4 3 2 1, not separate), you will get 1 2 3 4 5 6 1000.
sort 50 300 27 5
5 27 50 300
public static void main (String[] args) {
Scanner scnr = new
Scanner(System.in);
String a = "";
a =
scnr.nextLine();
String[] b =
imput.split(" ")
if (b[0].equalsI("sort")) {
}
Please do not change above code.
In: Computer Science
Implement a function that reads numbers in from a file with one number per line and outputs all the possible sums that can be formed by subsets of the numbers. For instance, if the numbers in the file are 1 2 4, then the output would be 0, 1, 2, 4, 3, 5, 6, 7. Note that 0 is in the output because it uses none of the numbers, while 7 is the sum of all of the numbers.
// Return all sums that can be formed from subsets of elements in arr
public static ArrayList<Integer> allSums( ArrayList<Integer> arr ) { ... }In: Computer Science
Chorus, Inc. expects quarterly sales volume for 2017 as follows: 1) 40,000 units; 2) 60,000; 3) 100,000; and 4) 50,000. Additionally, Chorus expects quarterly sales volume for 2018 as follows: 1) 70,000 units; 2) 80,000; 3) 75,000; and 4) 85,000. Chorus has an inventory policy which requires ending finished goods inventory to be 30% of budgeted sales for the next quarter.
(T or F) The amount of production necessary to meet the expected sales for 2017 is 275,000 units.
In: Accounting
based on the Amazon company. answer the following
questions.
Warehouse application criteria
1.important functions of warehousing
2.operating principle of warehouse design
3.economic and service benefits of warehousing
4. consolidation,Break-bulk and cross-dock warehouse
5. contract warehouse
Strategic marketing application criteria
1. strategic planning and strategic marketing
2. overall sales strategy and sales budget
3. forecasting approaches
4. types of distribution channels
5. channel strategy and channel design
In: Economics
A little stuck, could you please show working out?
Which of the following processes represents an oxidation reaction?
|
1. ?Mg(s) -> Mg2+(aq) |
||
|
2. ?2H+(aq) -> H2(g) |
||
|
3. ?Cu2+(aq) -> Cu(s) |
||
|
4. ?I2(s) -> 2I-(aq) |
Which one of the following processes represents a reduction reaction?
|
1. ?Zn(s) -> Zn2+(aq) |
||
|
2. ? ?2Cl-(aq) -> Cl2(g) |
||
|
3. ? ?H2(g) -> 2H+(aq) |
||
|
4. Cu2+(aq) -> Cu(s) |
In: Chemistry
Assume, you are trying to execute the following jobs with execution times and their varying arrival times are given. These jobs are run on a single processor using pre-emptive SJF algorithm. If the average waiting time of the processes is 4 millisecond, then the value of X is________. Show the equation with values that helps you to find the value of X.
Process No: J1 J2 J3 J4 J5 J6
Arrival time: 0 1 2 3 4 5
Burst Time: 7 5 3 1 2 X
In: Computer Science
A 30-year old woman presents to the ER in late December with fever, dry cough and tiredness. She reported being in contact with a person having flu-like symptoms
1- 1-- Give two possible viral diagnosis for her case.
2- 2- What is the confirmatory test that should be performed?
3- 3- What are the steps of this confirmatory test? State the components (example reagents) of each step.
4- 4- What is the difference between this confirmatory test and the one used for diagnosing Herpes virus?
In: Nursing
Problem 24-5A Payback period, break-even time, and net present value LO P1, A1
Sentinel Company is considering an investment in technology to
improve its operations. The investment will require an initial
outlay of $252,000 and will yield the following expected cash
flows. Management requires investments to have a payback period of
3 years, and it requires a 10% return on investments. (PV of $1, FV
of $1, PVA of $1, and FVA of $1) (Use appropriate factor(s)
from the table provided.)
| Period | Cash Flow | |||
| 1 | $ | 47,300 | ||
| 2 | 52,000 | |||
| 3 | 76,900 | |||
| 4 | 95,100 | |||
| 5 | 125,900 | |||
Required:
1. Determine the payback period for this
investment.
2. Determine the break-even time for this
investment.
3. Determine the net present value for this
investment.
Determine the payback period for this investment. (Enter cash outflows with a minus sign. Round your Payback Period answer to 1 decimal place.)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Determine the break-even time for this investment. (Enter cash outflows with a minus sign. Round your break-even time answer to 1 decimal place.)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Determine the net present value for this investment.
|
In: Accounting
Sentinel Company is considering an investment in technology to improve its operations. The investment will require an initial outlay of $257,000 and will yield the following expected cash flows. Management requires investments to have a payback period of 3 years, and it requires a 8% return on investments. (PV of $1, FV of $1, PVA of $1, and FVA of $1) (Use appropriate factor(s) from the table provided.)
| Period | Cash Flow | |||
| 1 | $ | 48,500 | ||
| 2 | 52,900 | |||
| 3 | 75,900 | |||
| 4 | 94,700 | |||
| 5 | 126,900 | |||
Required:
1. Determine the payback period for this
investment.
2. Determine the break-even time for this
investment.
3. Determine the net present value for this
investment.
Determine the payback period for this investment. (Enter cash outflows with a minus sign. Round your Payback Period answer to 1 decimal place.)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Determine the break-even time for this investment. (Enter cash outflows with a minus sign. Round your break-even time answer to 1 decimal place.)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Determine the net present value for this investment.
|
In: Accounting