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
Why/how is a paperclip able to float on water?
abruzzese [7]

Answer:

Water surface tension

Explanation:

The water around the paperclip forms a kind of elastic surface, deforming, in which the clip can stay afloat.

This is because the molecules that are on the surface of the water, already in contact with the air, try to cling to those that are next to them and those that are immediately below.

If we added even if it were just a drop of soap in the water, the clip would go to the bottom, because the soap has the ability to decrease the surface tension of the water.

7 0
3 years ago
Statement 1: All balls hit the ground at the same time. Statement 2: All balls hit the ground with the same force. Statement 3:
laiz [17]

Answer:

Statement 1: All balls hit the ground at the same time

Explanation:

When there is no resistance of air, the acceleration due to gravity experienced by all the bodies are same. So for falling bodies, neglecting the air resistance, the falling object will be weightless and therefore all the objects will hit the ground at the same time when there is nor air resistance and the objects are considered to be falling in vacuum.

7 0
3 years ago
A ½-hp motor requires 120 volts. What amperage is required?
Zolol [24]

Answer:

  3.11 A

Explanation:

Use the given relations between power, horsepower, voltage, and current to find the current requirement for the motor.

  P = hp(745.7 W) = (1/2)(745.7 W) = 372.85 W

  I = P/V = (372.85 W)/(120 V) = 3.1071 A

The amperage required is about 3.11 A.

5 0
3 years ago
I am standing on the upper deck of the football stadium. I have an egg in my hand. I am going to drop it and you are going to tr
Alina [70]

Answer:

Δx = 25 ft.

Explanation:

Assuming that the person on the ground starts running at the same time as the egg is dropped, we have two simultaneous trajectories:

1 ) Egg falling:

If the egg is dropped, and we neglect the air resistance, we can use the kinematic equation that relates the distance and fall time, as follows:

yf-y₀ = 1/2* g* t²

If we take the up direction as positive, we can solve for t as follows:

0-100 ft = 1/2* (-32.15 ft/s²)* t²

⇒ t = \sqrt{(100*2)/32.15} = 2.5 sec.

2) Person on the ground running away:

In order to be able to run away, and then return to catch the egg, running at constant speed, he must run during exactly the half of the time that the egg is falling, i.e., 1.25 sec.

We can get the distance at which he can reach, applying the definition of velocity:

v = (xf-x₀) / (tfi-t₀)

If we choose t₀=0 and x₀ = 0 , we can solve for xf, as follows:

xf = v*t = 20 ft/sec*1.25 sec = 25 ft.

8 0
3 years ago
You can change lanes during a turn long as there’s no traffic and you driving slowly
Vanyuwa [196]
Your allowed to switch lanes as long as the road is clear and you use signals.
5 0
3 years ago
Other questions:
  • the overall management of the availability, usability, integrity, and security of data used in an enterprise is called ?
    6·1 answer
  • Problem 1 A coil measures ???? ???????? ⁄ meter in length with 500 turns of ???? ???? ⁄ inch diameter, and has a metallic core w
    13·1 answer
  • Prove that "a perfect conductor cannot contain an electrostatic field within it".​
    14·1 answer
  • If the contact surface between the 20-kg block and the ground is smooth, determine the power of force F when t = 4 s. Initially,
    14·1 answer
  • What advantage might there be to having the encoder located on the motor side of the gearhead instead of at the output shaft of
    10·1 answer
  • How much horse power do you think a Dodge Challenger hellcat has?
    5·2 answers
  • What are the benefits of using a multi view sketch to communicate a design
    14·1 answer
  • PLZZ HELP WILL GIVE BRAILYEST PLZZ HELP
    9·2 answers
  • 4) What term describes the movement of electrons from one atom to another? A) Chain reaction B) Energy transfer C) Electricity D
    11·2 answers
  • # 45 You are driving on a two-lane highway and the vehicle behind you wants to pass. You should
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!