answer.
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
ratelena
23 days ago
8

Write cout statements with stream manipulators that perform the following:

Engineering
1 answer:
grin007 [219]23 days ago
7 0

Answer:

A)cout<<setw(9)<<fixed<<setprecision(2)<<34.789;

B)cout<<setw(5)<<fixed<<setprecision(3)<<7.0;

C)cout<<fixed<<5.789E12;

D)cout<<left<<setw(7)<<67;

Explanation:

Stream Manipulators are special functions for use with the insertion (<<) and extraction (>>) operators on C++ stream objects, while the 'cout' statement outputs content to the standard output device in C++ programming.

setw: specifies the minimum width of the output field

setprecision: defines the number of decimal places for floating-point value formatting.

fixed: sets the format flag for floating-point streams.

left: left-aligns the output.

A) This statement shows the number 34.789 in a field that provides eight character spaces with two decimal precision. cout<<setw(9)<<fixed<<setprecision(2)<<34.789;

B) Here, the number 7.0 is displayed within six spaces with three decimal precision. cout<<setw(5)<<fixed<<setprecision(3)<<7.0;

C) This command prints 5.789e+12 in fixed-point format.  cout<<fixed<<5.789E12;

D) This statement left-aligns the number 67 across a field of six spaces. cout<<left<<setw(7)<<67;

You might be interested in
The rigid beam is supported by a pin at C and an A992 steel guy wire AB of length 6 ft. If the wire has a diameter of 0.2 in., d
Mrrafil [253]

Answer:

Change in length = 0.0913 in

Explanation:

Given data:

Length = 6 ft

Diameter = 0.2 in

Load w = 200 lb/ft

Solution:

We start by applying the equilibrium moment about point C, expressed as

∑M(c) = 0.............1

This can be used to find the force in AB.

10× 200 × ( 5) - (T cos(30)) × 10 = 0

Solving gives us

Tension in wire T(AB) = 1154.7 lb

We also know the modulus of elasticity for A992 is

E = 29000 ksi

And the area will be

Area = \frac{\pi }{4}\times 0.2^2

The change in length is expressed as

Change in length = \frac{PL}{AE}.........2

Substituting values results in

Change in length = \frac{1154.7 \times 6 \times 12}{\frac{\pi }{4}\times 0.2^2 \times 29000 \times 1000}

Change in length = 0.0913 in

8 0
26 days ago
A 227 pound compressor is supported by four legs that contact the floor of a machine shop. At the bottom of each leg there is a
choli [191]

Answer:

1.312 in

Explanation:

The details provided in the question are:

The weight of the compressor, W is 227 pounds.

It has 4 legs.

The maximum permissible pressure is 42 psi.

Let F represent the force exerted by each leg.

Thus,

W = 4F,

or

227 pounds = 4F,

implying that:

F = 56.75 pounds.

Furthermore,

Force = Pressure × Area,

therefore:

56.75 pounds = 42 psi × πr²  [ r signifies the radius of one leg]

Consequently, we find:

r² = 0.4301,

and thus:

r = 0.656;

resulting in a diameter equal to 2r = 2 × 0.656,

which equals 1.312 in.

6 0
29 days ago
Compute the sum with carry-wraparound (sometimes called the one's complement sum) of the following two numbers. Give answer in 8
grin007 [219]

Response:

00100111

Explanation:

We have been given;

10010110

10010000

Add them following standard binary addition rules

10010110

10010000

-------------

(1)00100110

-------------

ignore the leading (1) because it is a carry.

Increase the result by 1 to achieve a 1's complement sum

00100110 + 1 = 00100111

Final Result: 00100111

3 0
21 day ago
When exchanging information with anyone involved in the collision, you should _____.
alex41 [274]

Answer:

a

Explanation:

3 0
23 days ago
Read 2 more answers
Interlocking stacked material is done by​ _____.
Mrrafil [253]

Sagot:

B

Paliwanag:

3 0
23 days ago
Read 2 more answers
Other questions:
  • Who want to play "1v1 lol unblocked games 76"
    7·2 answers
  • Given two input integers for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is 0 1, the output is
    8·1 answer
  • Identify the four engineering economy symbols and their values from the following problem statement. Use a question mark with th
    10·1 answer
  • An overhead 25m-long, uninsulated industrial steam pipe of 100-mm diameter, is routed through a building whose walls and air are
    5·1 answer
  • The first step to merging is entering the ramp and _____.
    10·1 answer
  • Radioactive wastes are temporarily stored in a spherical container, the center of which is buried a distance of 10 m below the e
    13·1 answer
  • Small droplets of carbon tetrachloride at 68 °F are formed with a spray nozzle. If the average diameter of the droplets is 200 u
    10·1 answer
  • A pipe in a district heating network is transporting over-pressurized hot water (10 atm) at a mass flow of 0.5 kg/s. The pipe is
    14·1 answer
  • Suppose a steam locomotive is rated at 7500 horsepower. If its efficiency is 6%, how much wood must be burned in a 3-hour trip?
    11·1 answer
  • 1. A four-lane freeway (two lanes in each direction) is located on rolling terrain and has 12-ft lanes, no lateral obstructions
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!