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

Write cout statements with stream manipulators that perform the following:

Engineering
1 answer:
Semenov [28]2 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
The following passage contains a fragment. Select the correct revision. Presley took the exuberance of gospel and added the freq
Semmy [17]

Answer:

A

Explanation:

Option A was the only option that did not have a sentence fragment. All the other choices were fragments because they interrupted the flow of the sentence. A sentence fragment means that if you started reading where the period is, you would understand everything about the sentence and it would be clear. You cannot have an incomplete sentence that does not have background information. An example would be: And that is how you install it. This leaves information unanswered, such as what the subject of the sentence is, or in other words, what you were installing. Another indicator that this was a sentence fragment was that the sentence began with the word "And." Sentence fragments very commonly start with the word and, because that word shows that it is a continuation of a topic.

7 0
2 years ago
The uniform 8–ft board is pushed down into the water so it makes an angle of θ = 30o with the water surface. If the cross sectio
lana66690 [7]

Answer:

The vertical force, F = 19.9 lb.

Explanation:

3 0
2 years ago
140-character statement that completes this sentence: I pledge to not text and drive because...
s2008m [1.1K]

Answer:

its bad and to drive drunk is even worse

4 0
2 years ago
5. Which of these materials in a shop contain metals and toxins and can pollute the environment? A) Antifreeze B) Solvents C) Ba
Elza [17]
As a multiple choice the only correct answer is D
3 0
2 years ago
Read 2 more answers
The emissivity of galvanized steel sheet, a common roofing material, is ε = 0.13 at temperatures around 300 K, while its absorpt
Step2247 [10]

Answer:

759.99W/m²

Explanation:

Question: If the temperature of the sheet is 77C,what is the incident solar radiation on aday with Tinf= Tsurr= 16°C?

Given

Energy Equation of the Gas

αs * Gs * A + h * A * (T inf - Tg) + εσA (Tsurr⁴- Tg⁴) = 0

Where σ= 5.67 *10^-8 W/m²K⁴ (Stefan-Boltzmann constant)

ε = 0.13 (Emisivity)

αs = 0.65 (Absorptivity for solar radiation)

h = 7W/m²K⁴

Tg = 77 + 273.15K = 350.15K

T inf = 16 + 273.15 = 288.15K

T surr= T inf = 288.15

Substitute the above values in the Gas Equation, we have

0.65 * Gs * A + 7 * A * (288.15 - 350.15) + 0.13 * 5.67 * 10^-8 * A * (288.15⁴ - 350.15⁴) = 0

0.65 * Gs * A = - 7 * A * (288.15 - 350.15) - 0.13 * 5.67 * 10^-8 * A * (288.15⁴ - 350.15⁴)

A cancels out, so we are left with

0.65 * Gs = - 7 * (288.15 - 350.15) - 0.13 * 5.67 * 10^-8 * (288.15⁴ - 350.15⁴)

0.65Gs = 434 - 0.7372 * 10^-8(−8,137,940,481.697)

0.65Gs = 434 + 0.7372 * 81.37940481697

0.65Gs = 493.992897231070284

Gs = 493.992897231070284/0.65

Gs = 759.9890726631850

Gs = 759.99W/m² ------- Approximated

3 0
2 years ago
Other questions:
  • A subway car leaves station A; it gains speed at the rate of 4 ft/s^2 for of until it has reached and then at the rate 6 then th
    8·1 answer
  • Carbon dioxide gas enters a pipe at 3 MPa and 500 K at a rate of 2 kg/s. CO2 is cooled at constant pressure as it flows in the p
    10·1 answer
  • Your assignment is to write a menu driven program. The menu will be responded to using a switch statement. The menu options (cas
    6·1 answer
  • Suppose that a class CalendarDate has been defined for storing a calendar date with month, day and year components. (In our sect
    6·1 answer
  • With thermodynamics, one cannot determine ________.
    14·1 answer
  • The mass fractions of a mixture of gases are 15 percent nitrogen, 5 percent helium, 60 percent methane, and 20 percent ethane. T
    9·1 answer
  • 10. A maker of micromechanical systems can reduce product recalls by 10% with the installation of new packaging equipment. If th
    9·1 answer
  • What ratio between differential gain and common-mode gain is called​
    9·1 answer
  • Milton has been tracking the migrating patterns of whales in the northwest Atlantic Ocean for five years. He knows where and whe
    5·2 answers
  • An airplane in level flight at an altitude h and a uniform speed v passes directly over a radar tracking station A. Calculate th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!