Write a program that prompts the user to enter values for x

Assignment Help Computer Engineering
Reference no: EM132075962

Need help implementing this Java code

Suppose you are given a right triangle where the point at right angle is always located at (0, 0), the other two points are located at (0, y) and (0, x), respectively, where both x and y are positive values greater than 0.

Write a program that prompts the user to enter values for x and y, and then prints the result of two other angles in degrees.

If the user inputs values less than or equal to 0, then the program should terminate with a message "Incorrect values were entered!". Here is a sample run (and below figure shows it visually).

Enter the values for x, y: 5 4
Computed angles in degrees are 51.34 and 38.6

Reference no: EM132075962

Questions Cloud

What is the future value given amount : What's the future value of $20,000 after 14 years if the appropriate interest rate is 2.75%, compounded annually? The response must be typed.
What is ted new basis : The fair market value of Ted's property is $100,000 and the fair market value of John's property is $125,000. What is Ted's new basis
Tenders for supplies of green seed for its surrounds : The University of Millennia called for tenders for supplies of green seed for its surrounds, with a closing date of 1 June.
What pretax amounts did s and l : S&L Financial buys and sells securities expecting to earn profits on short-term differences in price. On December 27, 2016, S&L purchased Coca-Cola common.
Write a program that prompts the user to enter values for x : Write a program that prompts the user to enter values for x and y, and then prints the result of two other angles in degrees.
Discuss some of the ways organisations : Discuss some of the ways organisations, jobs and careers have changed over the past 10 years. What changes do you anticipate over the next 10 years?
Calculate the eac for each machine : Vandalay Industries is considering the purchase of a new machine for the production of latex. Machine A costs $3,100,000 and will last for six years.
Compute moozi fixed manufacturing overhead variances : Moozi applies manufacturing overhead to its products on the basis of standard machine-hours. Compute Moozi fixed manufacturing overhead variances for last year
How many pins for clock and ground : Let's say we broken it up into 8 banks? How many total pins now? 43 Then why use banks? Concurrent reads

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a program that will read up to ten nonnegative integer

Write a program that will read up to ten nonnegative integers into an array called number Array and then write the integers back to the screen.

  Identify the problem you would like to address

Identify the problem you would like to address. Create a 3D model of your prototype using paper or cardboard and upload a picture of the 3D model.

  Create a function like the pyramid function

Create a function like the pyramid function that does the upside-down version. Your function inverted Pyramid should also take an input character.

  Securing the web passwords

Describe how the Web passwords can be more secure. Give examples and/or details in order to support your ideas.

  Why is it much harder to design a data cache

To what extent do the 68020 instruction cache and the 68030 instruction and data caches impinge on the hardware systems designer.

  What is jitter and why is it a digital signal problem

What is jitter and why is it a digital signal problem? Which types of noise introduced in this chapter are continuous, and which are noncontiguous?

  What techniques can you use to identify improvements

What techniques can you use to identify improvements? Choose one technique and apply it to this situation- what improvements did you identify?

  Design the required data structures using uml class diagrams

Analyse the given problem, model, and design the required data structures using UML class diagrams. You will be implementing the software solution

  Algorithm for computing a topological ordering of a dag

But assume that we're given an arbitrary graph that may or may not be a DAG. Extend the topological ordering algorithm so that given an input directed graph G it outputs one of two thing.

  Diffe-hellman algorithm

Alice and Bob use the Diffe-Hellman to agree on a secret key. They select the prime p = 11, and a primitive root mod 11 g = 2.

  Explain what is meant by a functional requirement

Explain what is meant by a functional requirement. What are two types of functional requirements? Give two examples of each.

  Examine the practicality of building multiple interface

Examine the practicality of building multiple interface options for diverse populations, rather than building one interface that meets the needs of the majority of end users.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd