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 jet impinges directly on to a plate that is oriented normal to the axis of the jet. The mass flow rate of the jet is 50 kg/min
PilotLPTM [1.2K]

Answer:

166.67 N

Explanation:

Given:

Mass flow rate = 50 kg/min = 50 kg / 60 seconds = 0.833 kg/s

Initial velocity = 200 m/s

after striking the normal board the water will flow in the normal direction, thus the final velocity in the direction of the initial flow will be zero

therefore,

Force = (change in momentum)

or

Force = Initial momentum - final momentum

or

Force = 0.833 × 200 - 0.833 × 0

or

Force = 166.67 N

3 0
3 years ago
1)A wheel is used to turn a valve stem on a water valve. If the wheel radius is 1 foot and the stem, (axle), radius is .5 inches
Novay_Z [31]

Answer:

1.) 2.4

2.) 112 lbs

3.) 7.85 inches

4.) 6 lbs

5.) 2 lbs

6.) 67%

Explanation:

Given that

Radius of the wheel R = 1 foot

1 foot = 12 inches.

Radius of the axle r = 5 inches

1.) The mechanical advantage MA is :

MA = R/r = 12/5 = 2.4

2.) How much resistance force can ideally be overcome when an effort of 80 lbs is applied to the wheel of the water valve in problem 1?

MA = Load / effort

Where effort = 80 lbs

Substitute MA and effort into the formula

2.4 = Load / 80

Cross multiply

Load = 2.4 × 80 = 192 lbs

The resistance force to be overcome will be

Force = load - effort

Resistance force = 192 - 80 = 112 lbs

3) What is the linear distance traveled when a 2.5' diameter wheel makes one revolution

One revolution = 2π

Radius = 2.5 /2 = 1.25 inches

Linear distance S = angular distance Ø × radius r

S = Ør

S = 2π × 1.25

S = 7.85 inches

4. ) given that

Wheel radius R = 4

Axle radius r = 1

MA = 4/1 = 4

MA = Load / effort

4 = 24/ effort

Effort = 24/4 = 6 lbs

5.) 6 - 4 = 2lb

6.) Efficiency = MA / VR × 100

Efficiency = 4 / 6 × 100

Efficiency = 67%

3 0
3 years ago
The acceleration of a point is given. a = 20 t m/s2 When t=0, s = 50 m and v = -8 m/s. What are the position and velocity of the
lidiya [134]

Answer:

v=82 m/s

s=116m

Explanation:

a=20t

\frac{\mathrm{d} v}{\mathrm{d} t}=20t\\\int\limits dv =\int(20t) dt\\v={10}t^2+c

using condition given at t=0

-8=10\times 0^2 +c

c=-8

now equation becomes

v=10t²-8

v at t= 3s  v=82 m/s

again

\frac{\mathrm{d} s}{\mathrm{d} t}=10t^2-8

ds=(10t^2-8)dt\\\int\limits ds =\int(10t^2-8) dt\\s=\frac{10}{3} t^2-8t+b

now using condition given s=50 at t=0

b=50

now equation becomes

s=\frac{10}{3}t^3-8t+50

calculating s at t=3s

s=116m

6 0
3 years ago
Prove the following languages are nonregular, once using the pumping lemma and once using the Myhill-Nerode theorem. When using
VashaNatasha [74]

Answer:

For any string, we use s = xyz

Explanation:

The pumping lemma says that for any string s in the language, with length greater than the pumping length p, we can write s = xyz with |xy| ≤ p, such that xyi z is also in the language for every i ≥ 0. For the given language, we can take p = 2.

Here are the cases:

  • Consider any string a i b j c k in the language. If i = 1 or i > 2, we take x = \epsilon   and y = a. If i = 1, we must have j = k and adding any number of a’s still preserves the membership in the language. For i > 2, all strings obtained by pumping y as defined above, have two or more a’s and hence are always in the language.
  • For i = 2, we can take    and y = aa. Since the strings obtained by pumping in this case always have an even number of a’s, they are all in the language.
  • Finally, for the case i = 0, we take x = \epsilon  , and y = b if j > 0 and y = c otherwise. Since strings of the form b j c k are always in the language, we satisfy the conditions of the pumping lemma in this case as well.
8 0
3 years ago
14. An engine is brought into the shop with a
Lostsunrise [7]

Answer:

B. To accurately measure spark advance, use a timing light that incorporates an

ignition advance meter. The spark advance cannot be determined by listening to the way the engine sounds.

8 0
2 years ago
Other questions:
  • Air is compressed adiabatically from p1 1 bar, T1 300 K to p2 15 bar, v2 0.1227 m3 /kg. The air is then cooled at constant volum
    13·1 answer
  • The lab technician you recently hired tells you the following: Boss, an undisturbed sample of saturated clayey soil was brought
    6·1 answer
  • An electronic device dissipating 25 W has a mass of 20 g and a specific heat of 850 J/kg·0K. The device is lightly used, and it
    9·1 answer
  • WHAT IS A TOROID IN HYDRAULUCS?
    11·2 answers
  • 1. Represent each of the following combinations of units in the correct SI form using the appropriate prefix: (a) μMN, (b) N/μm,
    6·1 answer
  • So far in your lifetime, about how much garbage have you contributed
    12·1 answer
  • What is the uncertainty in position of an electron of an atom if there is t 2.0 x 10' msec uncertainty in its velocity? Use the
    12·1 answer
  • 1. Using the formula above, complete this task.
    9·1 answer
  • 2=333=3= im single text in comment
    13·2 answers
  • What are some sources of resistance? (Check all
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!