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
You are hired as the investigators to identify the root cause and describe what should have occurred based on the following info
creativ13 [48]

Answer:

The mass of fuel added, which is 10,166.2 kg is less than 22,300 kg which is the mass of fuel required to travel from Toronto to Edmonton, the plane therefore crashed.

Explanation:

Since density ρ = m/v where m = mass of fuel and v = volume of fuel, we need to find the mass of each volume of fuel.

So, m = ρv now ρ = specific gravity × density of water = 0.803 × 1000 kg/m³ = 803 kg/m³.

To find the mass of the 7,682 L of fuel, its volume is 7,682 dm³ = 7,682 dm³ × 1 m³/1000 dm³ = 7.682 m³.

It's mass, m = 803 kg/m³ × 7.682 m³ = 6168.646 kg

To find the mass of the extra 4,916 L of fuel added, we have

m' = ρv' where v' = 4,916 L = 4,916 dm³ = 4916 dm³ × 1 m³/1000 dm³ = 4.916 m³

m' =  803 kg/m³ × 4.916 m³ = 3947.548 kg

So, the total mass of the fuel is m" = m + m' = 6168.646 kg + 3947.548 kg = 10116.194 kg ≅ 10,166.2 kg

<u>Since this mass of fuel added, which is 10,166.2 kg is less than 22,300 kg which is the mass of fuel required to travel from Toronto to Edmonton, the plane therefore crashed.</u>

4 0
2 years ago
What type of intersection is this?
mote1985 [20]
Diverging Diamond Interchange
6 0
3 years ago
When would working with machinery be a common type of caught-in and caught-between<br> hazard?
tigry1 [53]

Answer:

A working with machinery be a common type of caught-in and caught-between  hazard is described below in complete detail.

Explanation:

“Caught in-between” accidents kill mechanics in a variety of techniques. These incorporate cave-ins and other hazards of tunneling activity; body parts extracted into unconscious machinery; reaching within the swing range of cranes and other installation material; caught between machine & fixed objects.

6 0
3 years ago
I need help with this question
Ad libitum [116K]

Answer:

LOL where is the question, that u need help with?

Explanation:

5 0
2 years ago
Design circuits that demonstrate all of the principles listed below. Set up the circuits and take measurements to show that the
Nata [24]

<u>Explanation</u>:

For series

\Delta V=V_{1}+V_{2}+\ldots+V_{n}=I R_{1}+I R_{2}+\ldots+I R_{n}(\text {voltages add to the batter } y)

\(I=I_{1}=I_{2}=I_{n}\) (current is the same)

V=I R(\text {voltage is directly proportional to } R)

R_{e q}=R_{1}+R_{2}+\ldots+R_{n} \quad \text { (resistance increase) }

For parallel

\Delta V=\Delta V_{1}=\Delta V_{2}=\Delta V_{n} \quad(\text { same voltage })

I=I_{1}+I_{2}+\ldots+I_{n}(\text {current adds})

\(I=\frac{\Delta V}{R_{e q}} \quad(R \text { inversal } y \text { proportional to } I)\)

\frac{1}{R_{e q}}=\frac{1}{R_{1}}+\frac{1}{R_{2}}+\ldots+\frac{1}{R_{n}}

3 0
3 years ago
Other questions:
  • Suppose that a wireless link layer using a CSMA-like protocol backs off 1ms on average. A packet’s link and physical layer heade
    5·1 answer
  • Are engineers needed in today’s society ? Why or why not ? I need a short three paragraph essay !!! Please help me !!!
    13·1 answer
  • A photovoltaic panel of dimension 2m×4m is installed on the
    14·1 answer
  • The air contained in a room loses heat to the surroundings at a rate of 50 kJ/min while work is supplied to the room by computer
    11·2 answers
  • All sized companies are required to have a written fire prevention plan true or false
    14·2 answers
  • A package is thrown down an incline at A with a velocity of 1 m/s. The package slides along the surface ABC to a conveyor belt w
    13·1 answer
  • Which of the following devices is a simple machine?
    11·2 answers
  • Find the capacitance reactance of a 0.1 micro frequency capacitor 50Hz and at 200Hz​
    9·1 answer
  • A. 50
    6·1 answer
  • Name eight safety electrical devices including their functions and effects if not present.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!