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
kolezko [41]
3 years ago
11

Each cout statement has a syntax error. Type the first cout statement, and press Run to observe the error message. Fix the error

, and run again. Repeat for the second, then third, cout statement. cout << "Num: " << songnum << endl; cout << int songNum << endl; cout << songNum " songs" << endl; Note: These activities may test code with different test values. This activity will perform two tests: the first with songNum = 5, the second with songNum = 9. See How to Use zyBooks.
Engineering
1 answer:
saul85 [17]3 years ago
4 0

Answer:

1. cout << "Num: " << songNum << endl;

2. cout << songNum << endl;

3. cout << songNum <<" songs" << endl;

Explanation:

//Full Code

#include <iostream>

using namespace std;

int main ()

{

int songNum;

songNum = 5;

cout << "Num: " << songNum << endl;

cout << songNum << endl;

cout << songNum <<" songs" << endl;

return 0;

}

1. The error in the first cout statement is that variable songnum is not declared.

C++ is a case sensitive programme language; it treats upper case and lower case characters differently.

Variable songNum was declared; not songnum.

2. Cout us used to print a Variable that has already been declared.

The error arises in int songNum in the second cout statement.

3. When printing more than one variables or values, they must be separated with <<

You might be interested in
How many hours should it take an articulated wheel loader equipped with a 4-yd^3 bucket to load 3000 yd^3 of gravel (average mat
densk [106]

Answer:

17 hours 15 minutes

Explanation:

See attached picture.

4 0
3 years ago
For a flow rate of 212 cfs find the critical depth in (a) a rectangular channel with ????=6.5 ft, (b) a triangular channel with
Fofino [41]

Answer:

A. 3.21ft

B. 3.51ft

C. 2.95ft

D. 1.5275ft

Explanation:

A) Q =212 cu.f/s

Formula for critical depth of rectangular section is: dc =[(Q^2) /(b^2(g))]^1/3

Where dc =critical depth, ft

Q= quantity of flow or discharge, ft3/s

B= width of channel, ft (m)

g = acceleration due to gravity which is 9.81m/s2 or 32.185ft/s2

Now, from the question,

Q = 212 cu.f/s and b=6.5ft

Therefore, the critical depth is: [(212^2)/(6.5^2 x32. 185)]^(1/3)

To give ; critical depth= (44,944/1359.82)^(1/3) = 3.21ft

B. Formula for critical depth of a triangular section; dc = (2Q^2/gm^2)^(1/5)

From the question, Q =212 cu.f/s and m=1.6ft while g= 32.185ft/s2

Therefore, critical depth = [(212^2) /(1.6^2 x32. 185)] ^(1/5) = (44,944/84.466)^(1/5) = 3.51ft

C. For trapezoidal channel, critical depth(y) is derived from (Q^2 /g) = (A^3/T)

Where A= (B + my)y and T=(B+2my)

Now from the question, B=6.5ft and m=5ft.

Therefore, A= (6.5 + 2y)y and T=(6. 5 + 2(5y))= 6.5 + 10y

Now, let's plug the value of A and T into the initial equation to derive the critical depth ;

(212^2 /32.185) = [((6.5 + 2y)^3)y^3]/ (6.5 + 10y)

Which gives;

1396.43 = [((6.5 + 2y)^3)y^3]/ (6.5 + 10y)

Multiply both sides by 6.5 + 10y to get;

1396.43(6.5 + 10y) = [((6.5 + 2y)^3)y^3]

Factorizing this, we get y = 2. 95ft

D) Formula for critical depth of a circular section; dc =D/2[1 - cos(Ѳ/2)]

Where D is diameter of pipe and Ѳ is angle at critical depth in radians.

Angle not given, so we assume it's perpendicular angle is 90.

Since angle is in radians, therefore Ѳ/2 = 90/2 = 45 radians ; converting to degree, = 2578. 31

Therefore, dc = (6.5/2) (1 - cos (2578.31))

dc = 3.25(1 - 0.53) = 3.25 x 0.47 = 1.5275ft

8 0
3 years ago
Instead of running blood through a single straight vessel for a distance of 2 mm, one mammalian species uses an array of 100 tin
Marina CMI [18]

Solution:

Given that :

Volume flow is, $Q_1 = 1000 \ mm^3/s$

So, $Q_2= \frac{1000}{100}=10 \ mm^3/s$

Therefore, the equation of a single straight vessel is given by

$F_{f_1}=\frac{8flQ_1^2}{\pi^2gd_1^5}$    ......................(i)

So there are 100 similar parallel pipes of the same cross section. Therefore, the equation for the area is

$\frac{\pi d_1^2}{4}=1000 \times\frac{\pi d_2^2}{4} $

or $d_1=10 \ d_2$

Now for parallel pipes

$H_{f_2}= (H_{f_2})_1= (H_{f_2})_2= .... = = (H_{f_2})_{10}=\frac{8flQ_2^2}{\pi^2 gd_2^5}$  ...........(ii)

Solving the equations (i) and (ii),

$\frac{H_{f_1}}{H_{f_2}}=\frac{\frac{8flQ_1^2}{\pi^2 gd_1^5}}{\frac{8flQ_2^2}{\pi^2 gd_2^5}}$

       $=\frac{Q_1^2}{Q_2^2}\times \frac{d_2^5}{d_1^5}$

       $=\frac{(1000)^2}{(10)^2}\times \frac{d_2^5}{(10d_2)^5}$

       $=\frac{10^6}{10^7}$

Therefore,

$\frac{H_{f_1}}{H_{f_2}}=\frac{1}{10}$

or $H_{f_2}=10 \ H_{f_1}$

Thus the answer is option A). 10

7 0
3 years ago
Air enters the compressor of an air-standard Brayton cycle with a volumetric flow rate of 60 m3/s at 0.8 bar, 280 K. The compres
natima [27]

Answer:

a) The Net power developed in this air-standard Brayton cycle is 43.8MW

b) The rate of heat addition in the combustor is 84.2MW

c) The thermal efficiency of the cycle is 52%

Explanation:

To solve this cycle we need to determinate the enthalpy of each work point of it. If we consider the cycle starts in 1, the air is compressed until 2, is heated until 3 and go throw the turbine until 4.

Considering this:

h_{i} =T_{i}C_{pair}=T_{i}1.005\frac{KJ}{Kg K}

\mu_{comp}=\frac{h_{2S}-h_{1}}{h_{2}-h_{1}}

\mu_{comp}=\frac{h_{3}-h_{4}}{h_{3}-h_{4S}}

G_{m} =\frac{PMG_{v}}{TR} =59.73\frac{Kg}{s}

Now we can calculate the enthalpy of each work point:

h₁=281.4KJ/Kg

h₂=695.41KJ/Kg

h₃=2105KJ/Kg

h₄=957.14KJ/Kg

The net power developed:

P_{net}=P_{Tur}-P_{Comp}=G_{m}((h_{3}-h_{4})-(h_{2}-h_{1}))

The rate of heat:

Q=G_{m}(h_{3}-h_{2})

The thermal efficiency:

\mu_{ther}=\frac{P_{net}}{Q}

3 0
3 years ago
An electromagnet is formed when a coil of wire wrapped around an iron core is hooked up to a dry cell battery. The current trave
german

Answer:

true

Explanation:

true An electromagnet is formed when a coil of wire wrapped around an iron core is hooked up to a dry cell battery. The current traveling through the wire sets up a magnetic field around the wire. TRUE or FALSE

3 0
3 years ago
Other questions:
  • 2.14 (a) Using series/parallel resistance reductions, find the equivalent resistance between terminals A and B in the circuit of
    14·1 answer
  • Carbon dioxide steadily flows into a constant pressure heater at 300 K and 100 kPa witha mass flow rate of 9.2 kg/s. Heat transf
    11·1 answer
  • The specific gravity of a substance that has mass of 10 kg and occupies a volume of 0.02 m^3 is a) 0.5 b) 1.5 c) 2.5 d) 3.5 e) n
    11·1 answer
  • If the Zener diode is connected<br>wrong polarity the voltage<br>across the load is?​
    11·1 answer
  • ¿Qué es la masonería?​
    14·1 answer
  • Although many countries have issues with soil erosion due to deforestation, some of the most serious effects are seen
    8·1 answer
  • a poorly tighten terminal is often the cause of a/an ? a) open circuit b) circuit breaker interrupt c)short circuit d) ground fa
    10·1 answer
  • How much thermal energy is needed to raise the temperature of 15kg gold from 45⁰ C up to 80⁰ C​
    10·1 answer
  • In the long run, if the firm decides to keep output at its initial level, what will it likely do? Stay on SRATC3 but decrease to
    15·1 answer
  • What is the purpose of encryption?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!