Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a slash, and the year. End with newline. The program will be tested with inputs 1 2000 and then with inputs 5 1950. Ex: If the input is 1 2000, the output is: 1/2000

Answers

Answer 1
Answer:

Answer:

import java.util.Scanner;

public class InputExample {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       int birthMonth;

       int birthYear;

       birthMonth = scnr.nextInt();

       birthYear = scnr.nextInt();

       System.out.println(birthMonth+"/"+birthYear);

   }

}

Answer 2
Answer:

import java.util.Scanner;

public class InputExample {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       int birthMonth;

       int birthYear;

       // Get input values for birthMonth and birthYear from the user

       birthMonth = scnr.nextInt();

       birthYear = scnr.nextInt();

       // Output the month, a slash, and the year

       System.out.println(birthMonth + "/" + birthYear);

   }

}

When the program is tested with inputs 1 2000, the output will be:

1/2000

And when tested with inputs 5 1950, the output will be:

5/1950

Know more about java program:

brainly.com/question/34106786

#SPJ3


Related Questions

Logical variables: Running late? Complete the tunction RunningLate such that the logical variable on Time is true if no Traffic is true and gasEmpty is false. Ex >> n°Traffic = true ; >> gasEmpty-false; >onTime - Runninglate(noTraffic,gasEmpty) logical Your Function B Save C Reset EE MATLAB Documentation 1 function onTime - RunningLate (noTraffic,gasEmpty) 2 % complete the logical expression to the right of . using the variables n°Traffic and gasEmpty 4 onTime - 6 end Code to call your function C Reset 1 noTraffic true; gasEmpty true; 2 onTime-Runninglate(noTraffic, gasEmpty)
A technician has been dispatched to assist a sales person who cannot get his laptop to display through a projector. The technician verified the video is displaying properly on the laptop's built-in screen. Which of the following is the next step the technician should take?
2) The switch in the circuit below has been closed a long time. At t=0, it is opened.Find the inductor current for il(t) for t> 0.
what is an example of an innovative solution to an engineering problem? Explain briefly why you chose this answer.
A system with a mass of 8 kg, initially moving horizontally with a velocity of 40 m/s, experiences a constant horizontal force of 25 N opposing the direction of motion. As a result, the system comes to rest.​​Determine the amount of energy transfer by work, in kJ, for this process and the total distance, in m, that the system travels.

A 1-m3 tank containing air at 10°C and 350 kPa is connected through a valve to another tank containing 3 kg of air at 35°C and 150 kPa. Now the valve is opened, and the entire system is allowed to reach thermal equilibrium with the surroundings, which are at 19.5°C. Determine the volume of the second tank and the final equilibrium pressure of air. The gas constant of air is R = 0.287 kPa·m3/kg·K.

Answers

Answer:

V₂=1.76 m³

P=222.03 KPa

Explanation:

Given that

For tank 1

V₁=1 m³

T₁= 10°C = 283 K

P₁=350 KPa

For tank 2

m₂=3 kg

T₂=35°C = 308 K

P₂=150 KPa

We know that for air

P V = m R T

P=pressure ,V= Volume,R= gas constant ,T= temperature ,m =mass

for tank 2

P₂ V₂ = m₂ R T₂

By putting the values

150 x V₂ = 3 x 0.287 x 308

V₂=1.76 m³

Final mass = m₁+m₂

m =m₁+m₂

The final volume V= V₂+V₁

V= 1.76 + 1 m³

V= 2.76 m³

The final temperature T= 19.5°C

T= 292.5 K

m=(PV)/(RT)

m_1=(P_1V_1)/(RT_1)

m_1=(350* 1)/(0.287* 283)

m_1=4.3\ kg

m =m₁+m₂

m =4.3 + 3 = 7.3 kg

Now at final state

P V = m R T

P x 2.76 = 7.3 x 0.287 x 292.5

P=222.03 KPa

An industrial load with an operating voltage of 480/0° V is connected to the power system. The load absorbs 120 kW with a lagging power factor of 0.77. Determine the size of the capacitor in vars that is necessary to raise the power factor to 0.9 lagging.

Answers

Answer:

Q=41.33 KVAR\ \nat\n\ 480 Vrms

Explanation:

From the question we are told that:

Voltage V=480/0 \textdegree V

Power P=120kW

Initial Power factor p.f_1=0.77 lagging

Final Power factor p.f_2=0.9 lagging

Generally the equation for Reactive Power is mathematically given by

Q=P(tan \theta_2-tan \theta_1)

Since

p.f_1=0.77

cos \theta_1 =0.77

\theta_1=cos^(-1)0.77

\theta_1=39.65 \textdegree

And

p.f_2=0.9

cos \theta_2 =0.9

\theta_2=cos^(-1)0.9

\theta_2=25.84 \textdegree

Therefore

Q=P(tan 25.84 \textdegree-tan 39.65 \textdegree)

Q=120*10^3(tan 25.84 \textdegree-tan 39.65 \textdegree)

Q=-41.33VAR

Therefore

The size of the capacitor in vars that is necessary to raise the power factor to 0.9 lagging is

Q=41.33 KVAR\ \nat\n\ 480 Vrms

Compute the longitudinal tensile strength of an aligned glass fiber-epoxy matrix composite in which the average fiber diameter and length are 0.010 mm and 2.5 mm, respectively, and the volume fraction of fibers is 0.40. Assume that thefiber-matrixbondstrengthis75MPa, the fracture strength of the fibers is 3500 MPa and the matrix stress at fiber failure is 8.0 MPa.

Answers

Answer:

Explanation:

Given that,

Average fiber diameter is 0.01mm

d = 0.01mm = 1 × 10^-5m

The average fiber length is 2.5mm

L = 2.5mm = 0.0025m

Volume of the fraction of fibers is 0.40

Vf = 0.40

Fiber matrix bond strengths is 75MPa

τ = 75 MPa

The fraction strength of the fibers is 3500 Mpa

σf = 3500 MPa

The matrix street fiber is 8 MPa

σm = 8 MPa

We need to find the critical fiber length and compare it to original fiber length

Ic = σf•d / 2τ

Ic = 3500 × 0.01 / 75 × 2

Ic = 0.233 mm

Since the critical fiber length of 0.233 mm is much less than the provided length of the fiber (2.5mm) , so we can use the following equation to find the longitudinal tensile strength

σcd = σf•Vf(1—Ic / 2L) + σm(1—Vf)

σcd = 3500×0.4[1—0.233/(2 × 2.5)] + 8(1—0.4)

σcd = 1400(1—0.0467) + (8 × 0.6)

σcd = 1334.67 + 4.8

σcd = 1339.47 MPa

The longitudinal tensile strength of the aligned glass fiber-epoxy matrix composite is 1339.47 MPa

Calculate the amount of power (in Watts) required to move an object weighing 762 N from point A to point B within 29 seconds. Distance between point A and point B is 5.0 meters and they are at the same level. (Ignore the frictional losses)

Answers

Answer:

0.556 Watts

Explanation:

w = Weight of object = 762 N

s = Distance = 5 m

t = Time taken = 29 seconds

a = Acceleration

g = Acceleration due to gravity = 9.81 m/s²

Equation of motion

s=ut+(1)/(2)at^2\n\Rightarrow a=(2* (s-ut))/(t^2)\n\Rightarrow a=(2* (5-0))/(29^2)=(10)/(481)

Mass of the body

m=(w)/(g)=(762)/(9.81)

Force required to move the body

F=ma\n\Righarrow F=(762)/(9.81)* (10)/(481)

Velocity of object

v=u+at\n\Rightarrow v=0+(10)/(481)* 29\n\Rightarrow v=(10)/(29)

Power

P=Fv\n\Rightarrow P=(762)/(9.81)* (10)/(481)* (10)/(29)=0.556\ W

∴ Amount of power required to move the object is 0.556 Watts

A cylindrical bar of metal having a diameter of 19.2 mm and a length of 207 mm is deformed elastically in tension with a force of 52900 N. Given that the elastic modulus and Poisson's ratio of the metal are 61.4 GPa and 0.34, respectively, determine the following: a. The amount by which this specimen will elongate in the direction of the applied stress.
b. The change in diameter of the specimen. Indicate an increase in diameter with a positive number and a decrease with a negative number.

Answers

Answer:

1)ΔL = 0.616 mm

2)Δd = 0.00194 mm

Explanation:

We are given;

Force; F = 52900 N

Initial length; L_o = 207 mm = 0.207 m

Diameter; d_o = 19.2 mm = 0.0192 m

Elastic modulus; E = 61.4 GPa = 61.4 × 10^(9) N/m²

Now, from Hooke's law;

E = σ/ε

Where; σ is stress = force/area = F/A

A = πd²/4 = π × 0.0192²/4

A = 0.00009216π

σ = 52900/0.00009216π

ε = ΔL/L_o

ε = ΔL/0.207

Thus,from E = σ/ε, we have;

61.4 × 10^(9) = (52900/0.00009216π) ÷ (ΔL/0.207)

Making ΔL the subject, we have;

ΔL = (52900 × 0.207)/(61.4 × 10^(9) × 0.00009216π)

ΔL = 0.616 × 10^(-3) m

ΔL = 0.616 mm

B) Poisson's ratio is given as;

υ = ε_x/ε_z

ε_x = Δd/d_o

ε_z = ΔL/L_o

Thus;

υ = (Δd/d_o) ÷ (ΔL/L_o)

Making Δd the subject gives;

Δd = (υ × d_o × ΔL)/L_o

We are given Poisson's ratio to be 0.34.

Thus;

Δd = (0.34 × 19.2 × 0.616)/207

Δd = 0.00194 mm

Young students show a preference for which modality?

Answers

Answer. In the present study, it was found that 61% students had multimodal learning style preferences and that only 39% students had unimodal preferences. Amongst the multimodal learning styles, the most preferred mode was bimodal, followed by trimodal and quadrimodal respectively 

Explanation: