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
9966 [12]
4 years ago
8

Write cout statements with stream manipulators that perform the following:

Engineering
1 answer:
Semenov [28]4 years 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 functions specifically designed to be used in conjunction with the insertion (<<) and extraction (>>) operators on stream objects in C++ programming while the 'cout' statement is used to display the output of a C++to the standard output device.

setw:  used to specify the minimum number of character positions on the output field

setprecision: Sets the decimal precision to be used to format floating-point values on output operations.

fixed:  is used to set the floatfield format flag for the specified str stream.

left: adjust output to the left.

A) To display the number 34.789 in a field of eight spaces with two decimal places of precision. cout<<setw(9)<<fixed<<setprecision(2)<<34.789;

B) To display the number 7.0 in a field of six spaces with three decimal places of precision. cout<<setw(5)<<fixed<<setprecision(3)<<7.0;

C) To print out the number 5.789e+12 in fixed-point notation.  cout<<fixed<<5.789E12;

(D) To display the number 67 left-justified in a field of six spaces. cout<<left<<setw(7)<<67;

You might be interested in
A column in a building is subjected to the following load effects:
vagabundo [1.1K]

Answer:

attached below

Explanation:

6 0
3 years ago
The lattice constant of a body centered cubic unit cell is a=4.85 oA. Determine the volume density of atoms. (Hints: Volume dens
Lelechka [254]

Answer:

the volume density of atoms = 1.75 x 10^22 /cm3

Explanation:

The detailed steps is as shown in the attached file.

3 0
3 years ago
A water jet that leaves a nozzle at 60 m/s at a certain flow rate generating power of 250 kW by striking the buckets located on
wlad13 [49]

Answer:

The mass flow rate of jet =69.44 kg/s

Explanation:

Given that

velocity of jet v= 60 m/s

Power  P=250 KW

As we know that force offered by water F

F=\rho\ A \ v^2

Power P= F.v

So now power given as

P=\rho\ A \ v^3

We know that mass flow rate = ρAv

P=mass\ flow\ rate\ \times v^2

250 x 1000 = mass flow rate x 3600

mass flow rate = 69.44 kg/s

So the mass flow rate of jet =69.44 kg/s

4 0
4 years ago
Unless otherwise posted, the speed limit for cars in a residential area is
vlada-n [284]

Answer:

The answer is A (25 miles per hour).

6 0
3 years ago
Read 2 more answers
Natural gas at and standard atmospheric pressure of 14.7 psi (abs) is compressed isentropically to a new absolute pressure of 70
padilas [110]

Complete question:

Natural gas at 70 ⁰F and standard atmospheric pressure of 14.7 psi (abs) is compressed isentropically to a new absolute pressure of 70 psi.  Determine the final density and temperature of the gas.

Answer:

The final density of the natural gas is 0.004243 slugs/ft³ and

The final temperature of the natural gas is 306.6 ⁰F

Explanation:

For Ideal gas: P = ρRT

R  is ideal gas constant =  3.099 x 10³  ft lb / slug⁰R

T₁ is initial temperature = 70 ⁰F = (70+460)⁰R = 530⁰R

P₁ is intial pressure of the gas = 14.7 psi = (14.7 lb/in² X 144 in²/ft²) = 2116.8 lb/ft²

From the ideal gas equation, we calculate initial density of the natural gas:

ρ₁ = P/RT ⇒ 2116.8/(3.099 x 10³ X 530) = 0.001289 slugs/ft³

For isentropic process:

\frac{P}{\rho^K} = Constant

where  K  is the ratio of specific heats for natural gas; K  =  1.31, Therefore

\frac{P_1}{\rho_1^{K}} = \frac{P_2}{\rho_2^{K}} ,\rho_2^K = (\frac{P_2}{P_1})\rho_1^K ,  \rho_2 = (\frac{P_2}{P_1})^\frac{1}{K}  \rho_1

\rho_2 = (\frac{70}{14.7})^\frac{1}{1.31} (0.001289) = (4.7619)^{0.76336}(0.001289) = 0.004243 slugs/ft³

Final density; ρ₂ = 4.243 X10⁻³ slugs/ft³

From ideal gas equation; P = ρRT

P₂ = ρ₂RT₂

T₂ = P₂/ρ₂R

P₂ (lb/ft²) =  (70 lb/in²)( 144 in²/ft²) = 10080 lb/ft²

T₂ = 10080/(0.004243 X 3099)

T₂ = 766.6⁰R

Final Temperature; T₂ = (766.6-460)⁰F = 306.6⁰F

7 0
3 years ago
Other questions:
  • A concrete mix design calls for 6.5 sacks of cement, a water/cement ratio of 0.45, and an air content of 2.5%. 1. Complete the m
    13·2 answers
  • What would happen if an exposed film was accidentally placed in the fixer before being placed in the developer
    10·1 answer
  • Consider a large plane wall of thickness L = 0.3 m, thermal conductivity k = 2.5 W/m · °C, and surface area A =12 m2. The left s
    6·1 answer
  • Which examples demonstrate tasks commonly performed in Maintenance/Operations jobs? Check all that apply.
    11·2 answers
  • What is the meaning of the measurement met?
    5·1 answer
  • Technician A says that in a circuit that has 3 Ohms of resistance and operates on 12 volts, the amperage must be 4 amps. Technic
    10·1 answer
  • This is due in a few hours but I appreciate it if it was answered soon so I can rest.
    5·1 answer
  • Which term refers to the practical applications of scientific knowledge
    12·1 answer
  • This is used to keep all cleaning supplies and chemicals safe
    5·1 answer
  • Gray cast iron, with an ultimate tensile strength of 31 ksi and an ultimate compressive strength of 109 ksi, has the following s
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!