1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
coldgirl [10]
4 years ago
13

Write an ALP to separate odd and even numbers from an array of N numbers; arrange odd

Engineering
1 answer:
Marta_Voda [28]4 years ago
6 0

Below is the program to separate odd and even numbers                                  

<u>Explanation</u>:

<u>L1:</u>

         mov ah,00

         mov al,[BX]

         mov dl,al

         div dh

         cmp ah,00

         je EVEN1

         mov [DI],dl

         add OddAdd,dl

         INC DI

         INC BX

         Loop L1

         jmp CAL

    <u>EVEN1:</u>

         mov [SI],dl

         add Even Add,dl

         INC SI

         INC BX

         Loop L1

    <u>CAL:   </u>  

         mov ax,0000

         mov bx,0000

         mov al,OddAdd

         mov bl,EvenAdd

         MOV  ax,4C00h

         int 21h

end

The above program separates odd and even numbers from the array using 8086 microprocessor. It has odd numbers in 2000h and even numbers in 3000h.

You might be interested in
True or False; If I was trying to find the Voltage of my computer, and I was given the Watts and Amps it uses, I would use Watt'
defon

Answer:

true

Explanation:

8 0
3 years ago
True or false <br> 19. Closed systems rely on feedback from outside of the system to operate.
Furkat [3]

Answer: True

Explanation: Closed loop relies on feedback from PNS to make modifications in the movement, open loop allows action in the absence of feedback, 2. ... Closed loop can change the initial commands, open loop can not change the initial commands.

6 0
3 years ago
The soil borrow material to be used to construct a highway embankment has a mass unit weight of 107.0 lb/cf and a water content
MrRissso [65]

Answer:

Option D

Explanation:

Given information

Bulk unit weight of 107.0 lb/cf

Water content of 7.3%,=0.073

Specific gravity of the soil solids is 2.62

Specifications

Dry unit weight is 113 lb/cf  

Water content is 6%.

Volume of embankment is 440,000-cy

Borrow material

Dry_{unit,weight}=\frac {bulk_{unit,weight}}{1+water_{content}}=\frac {107}{1+0.073}= 99.72041 lb/cf  

Embankment

Considering that the volume of embankment is inversely proportional to the dry unit weight

\frac {V_{embankment}}{V_{borrow}}=\frac {Dry_{borrow}}{Dry_{embankment}}

Therefore, V_{borrow}=V_{embankment} *\frac {Dry_{embarkement}}{Dry_{borrow}}

V_{borrow}=440,000-cy*\frac {113 lb/cf }{99.72041 lb/cf }= 498594-cy

Therefore, volume of borrow material is 498594-cy

(b)

The weight of water in embankment is found by multiplying the moisture content and dry unit weight.

Assuming that all the specifications are achieved, weight of water in embankment=0.06*113=6.78 lb/cf

Since 1 yd^{3}= 27 ft^{3}

The embankment requires water of  6.78*27*440000= 80546400 lb

Borrow materials’ water will also be 0.073*99.72041=7.27959 lb/cf

Borrow material requires water of 7.27959*27*498594=97998120 lb

Extra water between borrow material and embankment=97998120 lb-80546400 lb=17451720 lb

Unit_{weight}=\frac {17451720}{498594}=35.00186 lb

1 gallon is approximately 8.35 yd^{3} hence

\frac {35.00186 lb/yd^{3}}{8.35}=4.19184 gallons/yd^{3}

That's approximately 4.2 gallons

7 0
3 years ago
Write a program that uses the function isPalindrome given below. Test your program on the following strings: madam, abba, 22, 67
defon

Answer:

#include <iostream>

#include <string>

using namespace std;

bool isPalindrome(string str)

{

   int length = str.length();

   for (int i = 0; i < length / 2; i++)

   {

       if (tolower(str[i]) != tolower(str[length - 1 - i]))

           return false;

   }

   return true;

}

int main()

{

   string s[6] = {"madam", "abba", "22", "67876", "444244", "trymeuemyrt"};

   int i;

   for(i=0; i<6; i++)

   {

       //Testing function

       if(isPalindrome(s[i]))

       {

           cout << "\n " << s[i] << " is a palindrome... \n";

       }

       else

       {

           cout << "\n " << s[i] << " is not a palindrome... \n";

       }

   }    

       

   return 0;

}

5 0
3 years ago
Does somebody know how to do this?
maksim [4K]
No I don’t sorry, I hope you do well
4 0
3 years ago
Other questions:
  • An object is supported by a crane through a steel cable of 0.02m diameter. If the natural swinging of the equivalent pendulum is
    6·1 answer
  • Going back the b beginning of the process is common in engineering true or false?
    15·1 answer
  • A wine aerator is a small, in-bottle, hand-held pour-through or decantor top device using the venturi effect for aerating the wi
    9·1 answer
  • A common chef's knife is single-beveled.<br> TRUE<br> FALSE
    10·1 answer
  • La Patrulla Fronteriza de los Estados Unidos analiza la compra de un helicóptero nuevo para la vigilancia aérea de la frontera d
    14·1 answer
  • 5 kg of a wet steam has a volume of 2 m3
    8·1 answer
  • The number of pulses per second from IGBTs is referred to as
    10·1 answer
  • A _______ contact allows current to flow when the switch's operator is not activated.?
    6·1 answer
  • The irreversible losses in the penstock of a hydroelectric dam are estimated to be 7 m. The elevation difference between the res
    14·1 answer
  • 28. What is the value of a resistor in a series circuit if you measure 0.5 amps flowing through it and 15 volts
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!