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
Elena L [17]
3 years ago
7

Basic C++ For Loop I'm trying to learn. Replit tells me that the for in the forloop is an error, but I don't know what's wrong.

Can anyone help?

Engineering
1 answer:
STatiana [176]3 years ago
8 0

Answer:

  curly brackets are missing

Explanation:

The body of the main() function need to be enclosed in curly brackets. Try this:

int P = 3000;

int main( ) {

  for (int t = 0; t < 10; t++) {

     cout << P;

  }

}

You might be interested in
1. Examine the following circuit. Find RT, I3, R1, R2, R3, V1, V2 and V3. Show all of your work clearly below.
Mkey [24]

Explanation:

Ohm's law is used here. V = IR, and variations. The voltage across all elements is the same in this parallel circuit. (V1 =V2 =V3)

The total supply current is the sum of the currents in each of the branches. (It = I1 +I2 +I3)

Rt = (8 V)/(8 A) = 1 Ω . . . . supply voltage divided by supply current

I3 = 8A -3A -4A = 1 A . . . . supply current not flowing through other branches

R1 = (8 V)/(3 A) = 8/3 Ω

R2 = (8 V)/(4 A) = 2 Ω

R3 = (8 V)/(I3) = (8 V)/(1 A) = 8 Ω

V1 = V2 = V3 = 8 V

6 0
2 years ago
A piston-cylinder device contains 0.58 kg of steam at 300°C and 0.5 MPa. Steam is cooled at constant pressure until one-half of
Mumz [18]

Answer:

a) Tբ = 151.8°C

b) ΔV = - 0.194 m³

c) The T-V diagram is sketched in the image attached.

Explanation:

Using steam tables,

At the given pressure of 0.5 MPa, the saturation temperature is the final temperature.

Right from the steam tables (A-5) with a little interpolation, Tբ = 151.793°C

b) The volume change

Using data from A-5 and A-6 of the steam tables,

The volume change will be calculated from the mass (0.58 kg), the initial specific volume (αᵢ) and the final specific volume

(αբ) (which is calculated from the final quality and the consituents of the specific volumes).

ΔV = m(αբ - αᵢ)

αբ = αₗ + q(αₗᵥ) = αₗ + q (αᵥ - αₗ)

q = 0.5, αₗ = 0.00109 m³/kg, αᵥ = 0.3748 m³/kg

αբ = 0.00109 + 0.5(0.3748 - 0.00109)

αբ = 0.187945 m³/kg

αᵢ = 0.5226 m³/kg

ΔV = 0.58 (0.187945 - 0.5226) = - 0.194 m³

c) The T-V diagram is sketched in the image attached

3 0
3 years ago
Air is compressed in a reversible, isothermal, steady- flow process from 15 psia, 100°F to 100 psia. Calculate the work of compr
mixas84 [53]

Answer:

|W|=169.28 KJ/kg

ΔS = -0.544 KJ/Kg.K

Explanation:

Given that

T= 100°F

We know that

1 °F = 255.92 K

100°F = 310 .92 K

P _1= 15 psia

P _1= 100 psia

We know that work for isothermal process  

W=mRT\ln \dfrac{P_1}{P_2}

Lets take mass is 1 kg.

So work per unit mass

W=RT\ln \dfrac{P_1}{P_2}

We know that for air R=0.287KJ/kg.K

W=RT\ln \dfrac{P_1}{P_2}

W=0.287\times 310.92\ln \dfrac{15}{100}

W= - 169.28 KJ/kg

Negative sign indicates compression

|W|=169.28 KJ/kg

We know that change in entropy at constant volume

\Delta S=-R\ln \dfrac{P_2}{P_1}

\Delta S=-0.287\ln \dfrac{100}{15}

ΔS = -0.544 KJ/Kg.K

3 0
3 years ago
A wind turbine designer is considering installing a horizontal axis wind turbine at a location in Michigan. To increase the powe
bogdanovich [222]

Answer:

False ( B )

Explanation:

considering that the wind turbine is a horizontal axis turbine

Power generated/extracted by the turbine can be calculated as

P =  n * 1/2 *<em> p</em> *Av^3

where: n = turbine efficiency

           <em>p = air density </em>

<em>            </em>A = πd^2 / 4

           v =  speed

From the above equation it can seen that increasing the Blade radius by 10% will increase the Blade Area which will in turn increase the value of the power extracted by the wind turbine

3 0
2 years ago
Problem 10.012 SI A vapor-compression refrigeration cycle operates at steady state with Refrigerant 134a as the working fluid. S
pychu [463]

Answer:

a) 4.1 kw

b) 4.68 tons

c) 4.02

Explanation:

Saturated vapor enters compressor at ( p1 ) = 2.6 bar

Saturated liquid exits the condenser at ( p2 ) = 12 bar

Isentropic compressor efficiency = 80%

Mass flow rate = 7 kg/min

A) Determine compressor power in KW

compressor power = m ( h2 - h1 )

                                = 7 / 60 ( 283.71 - 248.545 )

                                = 4.1 kw

B) Determine refrigeration capacity in tons = m ( h1 - h4 )

                                                                       = 7/60 ( 248.545 - 107.34 )

                                                                       = 16.47 kw = 4.68 tons

C) coefficient of performance ( COP )

= Refrigeration capacity / compressor power

= 16.47 / 4.1 = 4.02

Attached below is the beginning part of the solution

   

7 0
2 years ago
Other questions:
  • The net potential energy EN between two adjacent ions, is sometimes represented by the expression
    13·1 answer
  • The flowchart below shows the design steps required to build a working model.
    6·1 answer
  • Generally the primary source of all water supply is to be said as
    5·2 answers
  • The 10mm diameter rod is made of Kevlar 49. Determine the change in
    7·1 answer
  • When checking the resistance of a dual voltage wye motor, there should be ____ resistance readings. 1) twelve 2) six 3) three
    12·1 answer
  • What's the best way to plan an organized​
    7·1 answer
  • Best budget freestyle drone?
    6·1 answer
  • Using your knowledge of how an ATM is used, develop a set of use cases that could serve as a basis for understanding the require
    15·1 answer
  • How does energy transition from one form to another as water moves from behind a dam to downstream of a dam?.
    8·1 answer
  • A wheel spins at a constant angular speed of 24rad/s.How many revolutions will the dosk go through in 5minutes?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!