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
Define the terms (a) thermal conductivity, (b) heat capacity and (c) thermal diffusivity
IceJOKER [234]

Explanation:

<u>(a)</u>

<u>The measure of material's ability to conduct thermal energy (heat) is known as thermal conductivity.</u> For examples, metals have high thermal conductivity, it means that they are very efficient at conducting heat.<u> The SI unit of heat capacity is W/m.K.</u>

The expression for thermal conductivity is:

q=-\kappa \bigtriangledown T

Where,

q is the heat flux

\kappa is the thermal conductivity

\bigtriangledown T is the temperature gradient.

<u>(b)</u>

<u>Heat capacity for a substance is defined as the ratio of the amount of energy required to change the temperature of the substance and the magnitude of temperature change. The SI unit of heat capacity is J/K.</u>

The expression for Heat capacity is:

C=\frac{E}{\Delta T}

Where,

C is the Heat capacity

E is the energy absorbed/released

\Delta T is the change in temperature

<u>(c)</u>

<u>Thermal diffusivity is defined as the thermal conductivity divided by specific heat capacity at constant pressure and its density. The Si unit of thermal diffusivity is m²/s.</u>

The expression for thermal diffusivity is:

\alpha=\frac{\kappa}{C_p \times \rho}

Where,

\alpha is thermal diffusivity

\kappa is the thermal conductivity

C_p is specific heat capacity at constant pressure

\rho is density

6 0
3 years ago
A square loop of wire surrounds a solenoid. The side of the square is 0.1 m, while the radius of the solenoid is 0.025 m. The sq
Semmy [17]

Answer:

I=9.6×e^{-8}  A

Explanation:

The magnetic field inside the solenoid.

B=I*500*muy0/0.3=2.1×e ^-3×I.

so the total flux go through the square loop.

B×π×r^2=I×2.1×e^-3π×0.025^2

=4.11×e^-6×I

we have that

(flux)'= -U

so differentiating flux we get

so the inducted emf in the loop.

U=4.11×e^{-6}×dI/dt=4.11×e^-6×0.7=2.9×e^-6 (V)

so, I=2.9×e^{-6}÷30

I=9.6×e^{-8}  A

6 0
3 years ago
Nêu đặc điểm của tín hiệu PAM rời rạc dạng lưỡng cực NRZ, RZ
zhuklara [117]

Answer:

yes it is certainly good ice cream

4 0
3 years ago
This problem has been solved!
lisov135 [29]

Answer: a) 135642 b) 146253

Explanation:

A)

1- the bankers algorithm tests for safety by simulating the allocation for predetermined maximum possible amounts of all resources, as stated this has the greatest degree of concurrency.

3- reserving all resources in advance helps would happen most likely if the algorithm has been used.

5- Resource ordering comes first before detection of any deadlock

6- Thread action would be rolled back much easily of Resource ordering precedes.

4- restart thread and release all resources if thread needs to wait, this should surely happen before killing the thread

2- only option practicable after thread has been killed.

Bii) ; No. Even if deadlock happens rapidly, the safest sequence have been decided already.

5 0
3 years ago
Can you use isentropic efficiency for a non-adiabatic compressor?
vodomira [7]
Mark brainliest please!

Isothermal work will be less than the adiabatic work for any given compression ratio and set of suction conditions. The ratio of isothermal work to the actual work is the isothermal efficiency. Isothermal paths are not typically used in most industrial compressor calculations.

Compressors

Compressors are used to move gases and vapors in situations where large pressure differences are necessary.

Types of Compressor

Compressors are classified by the way they work: dynamic (centrifugal and axial) or reciprocating. Dynamic compressors use a set of rotating blades to add velocity and pressure to fluid. They operate at high speeds and are driven by steam or gas turbines or electric motors. They tend to be smaller and lighter for a given service than reciprocating machines, and hence have lower costs.

Reciprocating compressors use pistons to push gas to a higher pressure. They are common in natural gas gathering and transmission systems, but are less common in process applications. Reciprocating compressors may be used when very large pressure differences must be achieved; however, since they produce a pulsating flow, they may need to have a receiver vessel to dampen the pulses.

The compression ratio, pout over pin, is a key parameter in understanding compressors and blowers. When the compression ratio is below 4 or so, a blower is usually adequate. Higher ratios require a compressor, or multiple compressor stages, be used.

When the pressure of a gas is increased in an adiabatic system, the temperature of the fluid must rise. Since the temperature change is accompanied by a change in the specific volume, the work necessary to compress a unit of fluid also changes. Consequently, many compressors must be accompanied by cooling to reduce the consequences of the adiabatic temperature rise. The coolant may flow through a jacket which surrounds the housing with liquid coolant. When multiple stage compressors are used, intercooler heat exchangers are often used between the stages.

Dynamic Compressors

Gas enters a centrifugal or axial compressor through a suction nozzle and is directed into the first-stage impeller by a set of guide vanes. The blades push the gas forward and into a diffuser section where the gas velocity is slowed and the kinetic energy transferred from the blades is converted to pressure. In a multistage compressor, the gas encounters another set of guide vanes and the compression step is repeated. If necessary, the gas may pass through a cooling loop between stages.

Compressor Work

To evaluate the work requirements of a compressor, start with the mechanical energy balance. In most compressors, kinetic and potential energy changes are small, so velocity and static head terms may be neglected. As with pumps, friction can be lumped into the work term by using an efficiency. Unlike pumps, the fluid cannot be treated as incompressible, so a differential equation is required:

Compressor Work
Evaluation of the integral requires that the compression path be known - - is it adiabatic, isothermal, or polytropic?
uncooled units -- adiabatic, isentropic compression
complete cooling during compression -- isothermal compression
large compressors or incomplete cooling -- polytropic compression
Before calculating a compressor cycle, gas properties (heat capacity ratio, compressibility, molecular weight, etc.) must be determined for the fluid to be compressed. For mixtures, use an appropriate weighted mean value for the specific heats and molecular weight.

Adiabatic, Isentropic Compression

If there is no heat transfer to or from the gas being compressed, the porocess is adiabatic and isentropic. From thermodynamics and the study of compressible flow, you are supposed to recall that an ideal gas compression path depends on:

Adiabatic Path
This can be rearranged to solve for density in terms of one known pressure and substituted into the work equation, which then can be integrated.
Adiabatic Work
The ratio of the isentropic work to the actual work is called the adiabatic efficiency (or isentropic efficiency). The outlet temperature may be calculated from
Adiabatic Temperature Change
Power is found by multiplying the work by the mass flow rate and adjusting for the units and efficiency.
Isothermal Compression

If heat is removed from the gas during compression, an isothermal compression cycle may be achieved. In this case, the work may be calculated from:

http://facstaff.cbu.edu/rprice/lectures/compress.html
4 0
3 years ago
Other questions:
  • Air is compressed in the compressor of a turbojet engine. Air enters the compressor at 270 K and 58 kPa and exits the compressor
    13·1 answer
  • 3. Air at 1 atm and 20 0 C flows tangentially on both sides of a smooth flat plate of width W=10 ft and length L=10 ft in the di
    8·1 answer
  • Material with hardness of 220 Vickers is harder than material with a hardness of 180 Vickers. a)-True b)- False
    8·1 answer
  • Air enters a compressor operating at steady state with pressure of 90 kPa, at a temperature of 350 K, and a volumetric flow rate
    13·1 answer
  • Write a single statement that prints outsideTemperature with 2 digits in the fraction
    8·1 answer
  • What is the definition of a tolerance on a dimension typically found on technical drawings?
    7·1 answer
  • Which of the following is an example of a reliable source?
    10·1 answer
  • Which of these parts of a cell phone is least likely to be found on the phone's circult board?
    5·1 answer
  • For many people in 3D modeling copyrights and licensing allow them to earn a living.
    12·1 answer
  • Describe the first case where the power of synthesis was used to solve design problems.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!