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
sergiy2304 [10]
3 years ago
5

6.27 LAB: Convert to binary - functions Write a program that takes in a positive integer as input, and outputs a string of 1's a

nd 0's representing the integer in binary. For an integer x, the algorithm is:
Engineering
1 answer:
Olin [163]3 years ago
4 0

Answer:

//Convert any decimal number to binary number

//Program is written in C++ Programming Language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

using namespace std;

// Main Method declared here

int main()

{

    int x;

   cout<<"Enter any integer number: ";

    cin>>x;

   DecBin(x);

   return 0;

}

// Here a function named DecBin is declared along with an integer variable, x

void DecBin(int x)

{

   // Declare an array to store the resulting binary digits

   int bindigit[32];

   // counter for binary array

   int kount = 0;

   while (x > 0) {

       // Store the remainder of each division in the declared array

       bindigit[kount] = x % 2;

       x = x / 2;

       kount++;

   }

   // Loop to print the binary digits in reverse order

   for (int j = i - 1; j >= 0; j--)

          {

       cout << bindigit[j];

        }

}

// End of Program

You might be interested in
A piston-cylinder assembly contains 2 lb of air at a temperature of 540 degrees R and a pressure of 1 atm. The air is compressed
attashe74 [19]

Answer:

W=-123.8Btu

Explanation:

Hello,

In this problem, the piston-cylinder assembly make us state the energy balance as:

Q-W=\Delta U

Thus, we must now compute \Delta U in terms of Cv as follows:

\Delta U=mCv(T_2-T_1)\\\Delta U=2lb*0.173\frac{Btu}{lb*R}*(840R-540R)\\ \Delta U=103.8Btu

Now, since heat is given off, its sign is negative, thus, the work is computed as:

W=Q-\Delta U\\W=-20Btu-103.8Btu=-123.8Btu

This work means that work was done over the system in order to allow the compression.

The suppositions were:

- The change in the internal energy is a function of the temperature.

- Air is an ideal gas.

Best regards.

8 0
4 years ago
Answer?...................
torisob [31]

Answer:

The correct option is;

c. Leaving the chuck key in the drill chuck

Explanation:

A Common safety issues with a drill press leaving the chuck key in the drill chuck

It is required that, before turning the drill press power on, ensure that chuck key is removed from the chuck. A self ejecting chuck key reduces the likelihood of the chuck key being accidentally left in the chuck.

It is also required to ensure that the switch is in the OFF position before turning plugging in the power cable

Be sure that the chuck key is removed from the chuck before turning on the power. Using a self-ejecting chuck key is a good way of insuring that the key is not left in the chuck accidentally. Also to avoid accidental starting, make sure the switch is in the OFF position before plugging in the cord. Always disconnect the drill from the power source when making repairs.

5 0
3 years ago
where σ(t) and σ(0) represents the time-dependent and initial (i.e., time =0) stresses, respectively, and t and τ denote elapsed
artcher [175]

Answer:

MUDA MUDA A certain vehicle loses 3.5% of its value each year. If the vehicle has an initial value of $11,168, construct a model that represents the value of the vehicle after a certain number of years. Use your model to compute the value of the vehicle at the end of 6 years.

Explanation:

4 0
4 years ago
Hand tools and power tools should be cleaned and stored in the same manner. A) True B) False
Serhud [2]

Answer:

False

Explanation:

4 0
3 years ago
A bullet weighing 0.08 lb is fired with a horizontal velocity of 1800 ft/s into the lower end of a slender 23-lb bar of length L
Sergeeva-Olga [200]

Answer: hello attached below is the missing image the slender weight is different from what is in the question here so I worked with 23-Ib as requested in the question

answer

≈ 12.17 Rad/sec

Explanation:

weight of bullet ( Wb ) = 0.08 Ib

horizontal velocity = 1800  ft/s

Slender(Wr) = 23-Ib bar with

length ( L ) = 30

h = 12 inches

Vro = 0

<u>Calculate the angular velocity of the bar immediately after the bullet becomes embedded  </u>

attached below is a detailed solution

6.708 = ( 0.05011 + 0.5011 ) w'

w' = 6.708 / 0.55121 ≈ 12.17 Rad/sec

6 0
3 years ago
Other questions:
  • A/an _____________ comes on if one of the dual hydraulic brake systems should fail or, in some vehicles, if the brake fluid is l
    6·1 answer
  • What information is needed to set up sales tax in QuickBooks Online for a client who only does business in their home state?
    11·1 answer
  • The increasing interconnections of peoples and countries around the world is known as ________.
    14·2 answers
  • Creating vacancies in ceramics. Consider doping ZrO2 with small concentrations of Nb205. The valence of Nb is 5. Assume that Nb
    10·1 answer
  • Has anyone lost faith in humanity ✌️
    7·1 answer
  • When would working with machinery be a common type of caught-in and caught-between<br> hazard?
    6·1 answer
  • When did michael faraday invent wind powered electrical generation?
    11·1 answer
  • What is the focus of 7th grade civics
    8·2 answers
  • 3. Whether an accident scene is safe or not, you should first take action to help any victims.
    12·1 answer
  • Which of the following circumstances call for a greater than normal following distance?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!