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
A commuter train traveling at 50 mi/h is 3 mi from a station. The train then decelerates so that its speed is 15 mi/h when it is
jonny [76]

Answer:

a) t = 277.477\,s\,(4.625\min), b) v_{f} = 0\,\frac{mi}{h}, c) a = -0.128\,\frac{ft}{s^{2}}

Explanation:

a) The deceleration experimented by the commuter train in the first 2.5 miles is:

a=\frac{[(15\,\frac{mi}{h} )\cdot (\frac{5280\,ft}{1\,mi} )\cdot (\frac{1\,h}{3600\,s} )]^{2}-[(50\,\frac{mi}{h} )\cdot (\frac{5280\,ft}{1\,mi} )\cdot (\frac{1\,h}{3600\,s} )]^{2}}{2\cdot (2.5\,mi)\cdot (\frac{5280\,ft}{1\,mi} )}

a = -0.185\,\frac{ft}{s^{2}}

The time required to travel is:

t = \frac{(15\,\frac{mi}{h} )\cdot (\frac{5280\,ft}{1\,fi} )\cdot(\frac{1\,h}{3600\,s} )-(50\,\frac{mi}{h} )\cdot (\frac{5280\,ft}{1\,fi} )\cdot(\frac{1\,h}{3600\,s} )}{-0.185\,\frac{ft}{s^{2}} }

t = 277.477\,s\,(4.625\min)

b) The commuter train must stop when it reaches the station to receive passengers. Hence, speed of train must be v_{f} = 0\,\frac{mi}{h}.

c) The final constant deceleration is:

a = \frac{(0\,\frac{mi}{h} )\cdot (\frac{5280\,ft}{1\,mi} )\cdot(\frac{1\,h}{3600\,s} )-(15\,\frac{mi}{h} )\cdot (\frac{5280\,ft}{1\,mi} )\cdot(\frac{1\,h}{3600\,s} )}{(2.875\,min)\cdot (\frac{60\,s}{1\,min} )}

a = -0.128\,\frac{ft}{s^{2}}

7 0
3 years ago
Select the correct answer.
Ulleksa [173]
The answer is A. Immediately inform her colleague
4 0
3 years ago
Which of the following best describes the relationship between the World Wide Web and the Internet? А The World Wide Web is a pr
Gwar [14]

Answer:

C

Explanation:

5 0
3 years ago
A well is located in a 20.1-m thick confined aquifer with a conductivity of 14.9 m/day and a storativity of 0.0051. If the well
ahrayia [7]

Answer:

S = 5.7209 M

Explanation:

Given data:

B = 20.1 m

conductivity ( K ) = 14.9 m/day

Storativity  ( s ) = 0.0051

1 gpm = 5.451 m^3/day

calculate the Transmissibility ( T ) = K * B

                                                       = 14.9 * 20.1 = 299.5  m^2/day

Note :

t = 1

U = ( r^2* S ) / (4*T*<em> t </em>)

  = ( 7^2 * 0.0051 ) / ( 4 * 299.5 * 1 ) = 2.0859 * 10^-4

Applying the thesis method

W(u) = -0.5772 - In(U)

       = 7.9

next we calculate the pumping rate from well ( Q ) in m^3/day

= 500 * 5.451 m^3 /day

= 2725.5 m^3 /day

Finally calculate the drawdown at a distance of 7.0 m form the well after 1 day of pumping

S = \frac{Q}{4\pi T} * W (u)

 where : Q = 2725.5

               T = 299.5

               W(u)  = 7.9

substitute the given values into equation above

S = 5.7209 M

4 0
3 years ago
A submarine submerges by admitting seawater (S = 1.03) into its ballast tanks. The amount of water admitted is controlled by air
ser-zykov [4K]

Answer:

Explanation:

Fw= y looking symbol sea water (2010.62-168171.2727/h+32.935)ft^3

6 0
3 years ago
Other questions:
  • Refrigerant-134a enters a diffuser steadily as saturated vapor at 600 kPa with a velocity of 160 m/s, and it leaves at 700 kPa a
    10·2 answers
  • In order to avoid slipping in the shop, your footwear should __
    10·2 answers
  • Q: Draw shear and bending moment diagram for the beam shown in
    5·1 answer
  • What are example for mantle
    5·1 answer
  • Which statement concerning symbols used on plans is true?
    10·1 answer
  • You apply a force of 19 lbs on to the end of a lever to lift a crate. The resistance of the load is 106 lbs. Calculate the
    13·1 answer
  • The purpose of the international residential code is to
    9·1 answer
  • 6.03 Discussion: Then &amp; Now - Safety
    9·1 answer
  • Which of the following is most likely to require changes to existing zoning laws?
    13·1 answer
  • Invent five new communication method wired or wireless you think would be practical
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!