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 car accelerates from rest with an acceleration of 5 m/s^2. The acceleration decreases linearly with time to zero in 15 s, afte
Tpy6a [65]

Answer: At time 18.33 seconds it will have moved 500 meters.

Explanation:

Since the acceleration of the car is a linear function of time it can be written as a function of time as

a(t)=5(1-\frac{t}{15})

a=\frac{d^{2}x}{dt^{2}}\\\\\therefore \frac{d^{2}x}{dt^{2}}=5(1-\frac{t}{15})

Integrating both sides we get

\int \frac{d^{2}x}{dt^{2}}dt=\int 5(1-\frac{t}{15})dt\\\\\frac{dx}{dt}=v=5t-\frac{5t^{2}}{30}+c

Now since car starts from rest thus at time t = 0 ; v=0 thus c=0

again integrating with respect to time we get

\int \frac{dx}{dt}dt=\int (5t-\frac{5t^{2}}{30})dt\\\\x(t)=\frac{5t^{2}}{2}-\frac{5t^{3}}{90}+D

Now let us assume that car starts from origin thus D=0

thus in the first 15 seconds it covers a distance of

x(15)=2.5\times 15^{2}-\farc{15^{3}}{18}=375m

Thus the remaining 125 meters will be covered with a constant speed of

v(15)=5\times 15-\frac{15^{2}}{6}=37.5m/s

in time equalling t_{2}=\frac{125}{37.5}=3.33seconds

Thus the total time it requires equals 15+3.33 seconds

t=18.33 seconds

3 0
2 years ago
An aircraft is flying at 300 mph true airspeed has a 50 mph tailwind. What is its ground speed?
Free_Kalibri [48]

Answer:

304.13 mph

Explanation:

Data provided in the question :

The Speed of the flying aircraft = 300 mph

Tailwind of the true airspeed = 50 mph

Now,

The ground speed will be calculated as:

ground speed = \sqrt{300^2+50^2}

or

The ground speed = \sqrt{92500}

or

The ground speed = 304.13 mph

Hence, the ground speed is 304.13 mph

8 0
3 years ago
Suppose the following two events occur at the same time: the Chicago Cubs win the World Series, and the workers who make Cubs me
Annette [7]

Answer:

the answer would be decrease decrease

3 0
3 years ago
MITM can present in two forms: eavesdropping and manipulation. Discuss the process involved when an attacker is eavesdropping an
Nikitich [7]

Answer / Explanation:

Eavesdropping attack is also sometimes refereed to as sniffing attack. It is simply the process by which an attacker or hacker tries to penetrate very suddenly into an unaware individuals network or server with the intention to steal information transmitted over the network or server through that computer.  

To prevent such attack, there are several mean which include installing network monitoring software to check who else is connected to the network but the most common method of preventing such attack is to encrypt the Hypertext Transfer Protocol (http) and the way to do this is by securing it with a sort of security key.

On installing the security key, the network becomes encrypted and secured such that whatever network transmitted over the network becomes encrypted and unable to read. The protocol then converts to (https).

5 0
2 years ago
What happens to the amperage draw of a condensing unit on a split AC system if the liquid line is restricted
cupoosta [38]

Answer:

The amperage draw of the condensing unit will be low.

Explanation:

A condensing unit is made up of a compressor and condenser, while an evaporating unit is made up of an evaporator coil.

A split AC system is a type of air conditioner system that has a condensing unit which is placed separately from the evaporative coil unit. Then the two units are connected to each other via a copper tube containing refrigerants.

The liquid line connects the condenser to the evaporator, and if this liquid line is restricted, the amp consumed by the condensing unit will be low.

6 0
3 years ago
Other questions:
  • The first step to merging is entering the ramp and _____.
    10·1 answer
  • "A communication between two devices is over the maximum limit of an ethernet frame size. The Transmission Control Protocol (TCP
    5·1 answer
  • Explain the differences between 1- Energy 2- Power 3- Work 4- Heat Your answer should explain the mathematica and physical meani
    5·1 answer
  • You are comparing distillation column designs at 1 atm and 3 atm total pressure for a particular separation. You have the same f
    5·1 answer
  • A container filled with a sample of an ideal gas at the pressure of 150 Kpa. The gas is compressed isothermally to one-third of
    10·1 answer
  • The entire system of components that produces power and transmits it to the road is called the vehicle's _____.
    13·1 answer
  • When the psychologist simply records the relationship between two variables...
    8·1 answer
  • Compute the thermal efficiency for an ideal gas turbine cycle that operates with a pressure ratio of 6.75 and uses helium gas.
    12·1 answer
  • I need this asap thank you :) plzzzzz When the spring on a mousetrap car is fully unwound, the force acting on the car is _____.
    11·1 answer
  • PLEASE HELP QUICK!!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!