answer.
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
WITCHER [35]
1 year ago
9

Write a program that prompts the user to read two integers and displays their sum . if anything but an integer is passed as inpu

t, your program should catch the inputmismatchexception that is thrown and prompt the user to input another number by printing "please enter an integer ."
Mathematics
1 answer:
natka813 [3]1 year ago
4 0
<span>The Java code below will ask for two integers and display the sum. If a non-integer is submitted the code will ask again. The break is used to exit the while true loop indicating that no-errors had occurred and two numbers were added. System.out.print("Please insert two integers and this will display the sum."); int numOne; int numTwo; while (True) { try{ System.out.print("Integer Number One? "); numOne = input.nextInt(); System.out.print("Integer Number Two? "); numTwo = input.nextInt(); System.out.print("The Sum Is: " + (numOne + numTwo)); break; } catch (InputMismatchException e) { System.out.print("please enter an integer ."); } }</span>
You might be interested in
Leo is constructing a tangent line from point Q to circle P. What is his next step?
artcher [175]

Answer:

Mark the point of intersection S of circles R and P, and construct line QS.

Step-by-step explanation:

In the figure attached, the problem is shown. The construction of the tangent lines from point Q to circle P is almost done. The last step is to draw the lines that pass through point Q and the intersection of the circles.

7 0
2 years ago
Daniel deposited $500 into a savings account and after 8 years, his investment is worth $807.07. The equation A = d(1.005)12t mo
shtirl [24]

Answer:

Step-by-step explanation:

The equation A = d(1.005)^12t modelling the value of Daniel’s investment shows a monthly compounded interest. This means that the interest is compounded 12 times in a year.

We can confirm by inputting the given values

t = 8 years

d = 509

Therefore,

A = 500(1.005)12 × 8

A = 500(1.005)^96

A = $807.07

Therefore, the true statements are

Increases

Exponential

Never Decrease

5 0
2 years ago
Points H and F lie on circle c What is the length of line segment GH?
Nina [5.8K]

Answer:

6 units

Step-by-step explanation:

Given: Points H and F lie on  circle with center C. EG = 12, EC = 9 and ∠GEC = 90°.

To find: Length of GH.

Sol: EC = CH = 9 (Radius of the same circle are equal)

Now, GC = GH + CH

GC = GH + 9

Now In ΔEGC, using pythagoras theorem,

(Hypotenuse)^{2} = (Base)^{2} +(Altitude)^{2} ......(ΔEGC is a right triangle)

(GC)^{2} = (GE)^{2} +(EC)^{2}

(GH + 9)^{2} = (9)^{2} +(12)^{2}

(GH )^{2} + (9)^{2} + 18GH = 81 + 144

(GH )^{2} + 81 + 18GH = 81 + 144

(GH )^{2} + 18GH = 144

Now, Let GH = <em>x</em>

x^{2} +18x = 144

On rearranging,

x^{2} +18 x - 144 = 0

x^{2} - 6x +24x + 144 = 0

x (x-6) + 24 (x - 6) =0

(x - 6) (x + 24) = 0

So x = 6  and x = - 24

∵ x cannot be - 24 as it will not satisfy the property of right triangle.

Therefore, the length of line segment GH = 6 units. so, Option (D) is the correct answer.

3 0
1 year ago
Read 2 more answers
This​ year, druehl,​ inc., will produce 57 comma 60057,600 hot water heaters at its plant in​ delaware, in order to meet expecte
ivolga24 [154]
If one labour works 200 hours per month, the amount of hot water heaters the labour can produce is = 200 × 0.25 = 50 hot water heaters

The demand is to produce 57600 hot water heaters

The number of labourers employed is 57600 ÷ 50 = 1152 labourers
5 0
2 years ago
Jack works for a company that pays him $20 an hour. His normal workday does not exceed 8 hours. After working 8 hours in a day,
Inessa05 [86]
He would get $40 and the correct graphs is c
4 0
1 year ago
Read 2 more answers
Other questions:
  • The number sentence 4x6=6x4 is an example of what property
    15·1 answer
  • If π is rounded to a whole number, what is a reasonable estimate for the circumference of a circle with a diameter of 9 cm?
    10·1 answer
  • Tegan needs to make 68 more snow blocks to finish building an igloo.
    12·2 answers
  • Find the coordinates of the midpoint of a segment with the given endpoints W(-12, -7), T(-8, -4)
    5·2 answers
  • Enrique earns 10 points for each question that he answers correctly on a geography test.
    5·2 answers
  • A certain shade of green paint is made from 5 parts yellow mixed with three parts blue if 2 cans of yellow are used how many can
    12·1 answer
  • X^2+16x+48=0 it says to solve each quadratic equation by factoring.
    14·2 answers
  • Shane and Abha earned a team badge that required their team to collect no less than 200020002000 cans for recycling. Abha collec
    9·2 answers
  • Given the following formula, solve for v.<br> s = 1/2a^2v + c
    12·2 answers
  • In a class of 30 students, 19 are studying French (F), 12 are studying Spanish (S) and 7 are studying both French and Spanish. H
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!