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
A box-shaped aquarium has horizontal dimensions 0.5 m by 1 m, and depth 0.5 m, and is filled two-thirds of the way to the surfac
antoniya [11.8K]

Answer:

3270 N/m^2

Explanation:

we can calculate the pressure difference between the bottom and surface of the tank by applying the equation for the net vertical pressure

Py = - Ph ( g ± a )

for a downward movement

Py = - Ph ( g - a )  ------ ( 1 )

From the above data given will  be

p = 1000 kg/m^3, h = 2/3 * 0.5 = 0.33 m , a =2g , g = 9.81

input values into equation 1  becomes

Py =  -Ph ( g - 2g ) = Phg ------ ( 3 )

Py = 1000 * 0.33 * 9.81

    = 3270 N/m^2

6 0
3 years ago
How does heat conduction differ from convection?
Helga [31]

Explanation:

Conduction:

     Heat transfer in the conduction occurs due to movement of molecule or we can say that due to movement of electrons in the two end of same the body. Generally,  phenomenon of conduction happens in the case of solid . In conduction heat transfer takes places due to direct contact of two bodies.

Convection:

              In convection heat transfer of fluid takes place due to density difference .In simple words we can say that heat transfer occur due to motion of fluid.

7 0
3 years ago
Read 2 more answers
A list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor. HERE
Free_Kalibri [48]

Using the knowledge of computational language in python it is possible to write a code that writes a list and defines the arrange.

<h3>Writing code in python:</h3>

<em>def isSorted(lyst):</em>

<em>if len(lyst) >= 0 and len(lyst) < 2:</em>

<em>return True</em>

<em>else:</em>

<em>for i in range(len(lyst)-1):</em>

<em>if lyst[i] > lyst[i+1]:</em>

<em>return False</em>

<em>return True</em>

<em>def main():</em>

<em>lyst = []</em>

<em>print(isSorted(lyst))</em>

<em>lyst = [1]</em>

<em>print(isSorted(lyst))</em>

<em>lyst = list(range(10))</em>

<em>print(isSorted(lyst))</em>

<em>lyst[9] = 3</em>

<em>print(isSorted(lyst))</em>

<em>main()</em>

See more about python at brainly.com/question/18502436

#SPJ1

7 0
2 years ago
if a current of 5 amps flows through a resistance of 40 ohms, what is the voltage across that resistor
olasank [31]

Answer:

200V

Explanation:

I = 5A

R = 40Ω

V = IR = (5)(40) = 200V

7 0
3 years ago
A thick steel slab (rho= 7800 kg/m3 , cp= 480 J/kg K, k= 50 W/m K) is initially at 300 °C and is cooled by water jets impinging
dimaraw [331]

Answer:

t = 2244.3 sec

Explanation:

calculate the thermal diffusivity

\alpha = \frac{k}{\rho c}

           = \frac{50}{7800\times 480} = 1.34 \times 10^{-5} m^2/s

                   

Temperature at 28 mm distance after t time  = =  50 degree C

we know that

\frac[ T_{28} - T_s}{T_i -T_s} = erf(\frac{x}{2\sqrt{at}})

\frac{ 50 -25}{300-25} = erf [\frac{28\times 10^{-3}}{2\sqrt{1.34\times 10^{-5}\times t}}]

0.909 = erf{\frac{3.8245}{\sqrt{t}}}

from gaussian error function table , similarity variable w calculated as

erf w = 0.909

it is lie between erf w = 0.9008  and erf w = 0.11246 so by interpolation we have

w = 0.08073

erf 0.08073 = erf[\frac{3.8245}{\sqrt{t}}]

0.08073 = \frac{3.8245}{\sqrt{t}}

solving fot t we get

t = 2244.3 sec

3 0
3 years ago
Other questions:
  • What are cars manufactured with today that allows for quick stopping without the brakes locking up?
    5·1 answer
  • Engineering is a broad category that includes a variety of occupations and attempts to solve problems using math and
    13·1 answer
  • When water precipitates from the sky, runs off downhill along the ground, or infiltrates down into the soil, its gravitational p
    5·1 answer
  • It is possible to have liquid water at 200°C. a)-True b)- False
    14·1 answer
  • An intranet is a restricted network that relies on Internet technologies to provide an Internet-like environment within the comp
    11·1 answer
  • Strands of materials A and B are placed under a tensile force of 10 Newtons. Material A deforms more than Material B.
    5·2 answers
  • I don't know what is this​
    9·1 answer
  • What is a transition? A. An animation that happens on a single slide B. An outline format that uses roman numerals C. An image f
    10·1 answer
  • Explain race condition..<br><br>don't spam..​
    13·2 answers
  • Imagine the arc of a football as it flies through the air. How does this motion illustrate classical mechanics?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!