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
liubo4ka [24]
3 years ago
7

Basic output with variables (Java) This zyLab activity is intended for students to prepare for a larger programming assignment.

Warm up exercises are typically simpler and worth fewer points than a full programming assignment. Warm up exercises are ideally suited for an in-person scheduled lab meeting or as self-practice. The last section provides a full programming assignment. A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (Submit for 2 points) (1) Output the user's input. Enter integer: 4 You entered: 4 (2) Extend to output the input squared and cubed. Hint: Compute squared as userNum userNum. (Submit for 2 points, so 4 points total). Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! (3) Extend to get a second user input into userNum2. Output sum and product. (Submit for 1 point, so 5 points total). Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4 5 is 9 45 is 20 LAB 1.16.1: Basic output with variables (Java) 0/5 ACTIVITY OutputWithVars.java Load default template... 1 import java.util.Scanner; 2 3 public class OutputWithVars public static void main(String [] args) Scanner scnr new Scanner(System. in); int userNum - 0 6 7 System.out.println ("Enter integer: ") userNum scnr. next Int ( ) ; 9 10 return; 11 12 13
Engineering
1 answer:
9966 [12]3 years ago
3 0

Answer:

1

Explanation:

You might be interested in
Refrigerant-134a enters the expansion valve of a refrigeration system at 120 psia as a saturated liquid and leaves at 20 psia. D
Shkiper50 [21]

Solution :

$P_1 = 120 \ psia$

$P_2 = 20 \ psia$

Using the data table for refrigerant-134a at P = 120 psia

$h_1=h_f=40.8365 \ Btu/lbm$

$u_1=u_f=40.5485 \ Btu/lbm$

$T_{sat}=87.745^\circ  F$

∴ $h_2=h_1=40.8365 \ Btu/lbm$

For pressure, P = 20 psia

$h_{2f} = 11.445 \ Btu/lbm$

$h_{2g} = 102.73 \ Btu/lbm$

$u_{2f} = 11.401 \ Btu/lbm$

$u_{2g} = 94.3 \ Btu/lbm$

$T_2=T_{sat}=-2.43^\circ  F$

Change in temperature, $\Delta T = T_2-T_1$

                                         $\Delta T = -2.43-87.745$

                                           $\Delta T=-90.175^\circ  F$

Now we find the quality,

$h_2=h_f+x_2(h_g-h_f)$

$40.8365=11.445+x_2(91.282)$

$x_2=0.32198$

The final energy,

$u_2=u_f+x_2.u_{fg}$

   $=11.401+0.32198(82.898)$

   $=38.09297 \ Btu/lbm$

Change in internal energy  

$\Delta u= u_2-u_1$

   = 38.09297-40.5485

  = -2.4556        

5 0
2 years ago
Leland wants to work in a Production career operating heavy machinery. Which type of education or training should Leland seek?
zhenek [66]

Answer:

it is indeed C

Explanation:

4 0
3 years ago
Read 2 more answers
Which branch of engineering most closely relates to mechanical engineering?
Rus_ich [418]

Answer:

C

Explanation:

I COULD be wrong, i'm not sure but im confident its c

4 0
3 years ago
Assume the following LTI system where the input signal is an impulse train (i.e.,x(t)=∑????(t−nT0)[infinity]n=−[infinity].a)Find
Igoryamba

Answer:

See explaination

Explanation:

The Fourier transform of y(t) = x(t - to) is Y(w) = e- jwto X(w) . Therefore the magnitude spectrum of y(t) is given by

|Y(w)| = |X(w)|

The phase spectrum of y(t) is given by

<Y(w) = -wto + <X(w)

please kindly see attachment for the step by step solution of the given problem.

4 0
3 years ago
Can someone draw a electric circuit with electrical symbols for this
erastovalidia [21]

Answer:

i cant draw it

i am sry

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Air is compressed in a piston-cylinder device. List three examples of irreversibilities that could occur
    13·1 answer
  • Sed is a multipurpose tool that combines the work of several filters. sed performs noninteractive operations on a data stream. s
    12·1 answer
  • an adiabatic compressor receives 1.5 meter cube per second of air at 30 degrees celsius and 101 kpa. The discharge pressure is 5
    11·1 answer
  • Let CFG G be the following grammar.
    7·2 answers
  • The cold drawn AISI 1040 steel bar with 25-mm width and 10-mm thick has a 6- mm diameter thru hole in the center of the plate. T
    10·1 answer
  • What are wheel cylinders used for?
    6·1 answer
  • Match the scenario to the related government program.
    8·1 answer
  • In the long run, if the firm decides to keep output at its initial level, what will it likely do? Stay on SRATC3 but decrease to
    15·1 answer
  • For heat transfer purposes, a standing man can be mod-eled as a 30-cm-diameter, 170-cm-long vertical cylinderwith both the top a
    11·1 answer
  • Overconfidence in more male drivers, particularly those under 25 years old, results in them being involved in crashes.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!