Develop a c# console application that compute pythogorus

Assignment Help Programming Languages
Reference no: EM13936107

Develop a C# console application that computes the hypotenuse of a right triangle. The computation of the hypotenuse of a right triangle is based on the Pythagorean Theorem: c2 = a2 + b2 and the hypotenuse, c ("long side") of the triangle can be computed with the formula the hypotenuse is equal to the square root of the side a squared plus side b squared.

The application should take as many side pairs inputs as the user desires and calculate each until the user enters a zero for both side one and side two (sentinel loop). You should use at least two (2) Math class methods.
The output should look something like this:

enter length of first side: 3

enter length of second side: 4

The hypotenuse is 5

enter length of first side: 3.44

enter length of second side: 4.88

The hypotenuse is 5.97059461025449

enter length of first side: 10.55

enter length of second side: 33.0

The hypotenuse is 34.6453820876607

enter length of first side: 0

enter length of second side: 0

Press any key to continue . . .

Note in the first example with the entries of 3 and 4 that the hypotenuse is computed as 5. If you are not getting that answer (The hypotenuse is 5) with entries of 3 and 4 respectively, then you are not taking the inputs and converting them correctly. Remember that a ReadLine brings in characters but there are differences in how the conversion methods for character and string values work. There is another way to convert a string number input to a numeric value type. You may have to do some research to come up with the right conversion method. Also note that type double values are used.

Name the .cs file Assignment_6_yourlastname and submit it to the link below.
Submit only the .cs file with your code in it.

Reference no: EM13936107

Questions Cloud

Contemporary issues and events that impact young children : The information and knowledge that you gain from this course will help you develop five Action Plans (one for each week of the course) focused on responding to contemporary issues and events that impact young children
Microprocessors dominated the desktop computer market : Why do you think Intel microprocessors dominated the desktop computer market? Are they dominant in the mobile devices market? Explain your answer. (Use bullet points).
Calculate firms profit maximizing price : Suppose the firm decided to charge the (maximum) willingness to pay for each movie ticket? How many tickets would it sell now, and how much profit would it make?
Should you accept the offer or cash the canadian dollars : He is willing to buy your C$200 for 1500 New Pesos. Should you accept the offer or cash the Canadian dollars in at the airport? Explain.
Develop a c# console application that compute pythogorus : Develop a C# console application that computes the hypotenuse of a right triangle
Explain why firms may issue shares in foreign markets : Explain why firms may issue shares in foreign markets. Why might MNCs issue more shares in Europe since the conversion to a single currency in 1999?
Would introduction of the gold standard be beneficial : Would the introduction of the World Central Bank within a three-currency monetary union positively or negatively affect the ability of the World Trade Organization to implement the various GATT Agreements in a fair and consistent manner?
How were capital flows between countries likely to be affect : Given the expectations for a decline in US interest rates and share prices, how were capital flows between the United States and other countries likely to be affected?
Carrying out a big data readiness assessment : The theme of the assignment is the reliability (or unreliability) of Assisted GPS Location Services in smart devices (Smart Phones, Tablets, Smart Cameras, etc.).

Reviews

Write a Review

Programming Languages Questions & Answers

  How write the program to calculate simple matrix

How to write the program to calculate simple 3x3 spreadsheet containing integers and strings. First, input spreadsheet source values from console.

  Write a prolog program to solve the sudoku puzzle

Write a Prolog program to solve the 6 by 6 Sudoku puzzle distributed in class. Do not use a solution downloaded from the Internet or elsewhere. Write your own. It should be designed along these lines: Label the squares X1, X2, ..., X36 as discuss..

  Write specifications for method of pre- and post-conditions

Write down specifications for method which advances any given date by one day. Write down statement of purpose, pre- and post-conditions, and description of parameters.

  Describe the necessary formulas and sample calculations

Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input

  Write program for user to perform arithmetic operations

Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, where a and b are integers and b is not equal to 0.

  Write down public static method using public interface

Using only public interface of UnorderedLinkedList class, write down a method: public static void reverse(UnorderedLinkedList staff) that reverses the entries in a linked list.

  Show how the tree might be type-checked

Attempt to derive proof tree for the judgment Show how the tree might be type-checked

  Write program to input number of hours worked

Write a program that allows the user to input the number of hours worked and hourly pay rate for employees and outputs their total pay.

  Determine recursive procedure and iterative procedure

Determine the example or recursive procedure and represent it as iterative procedure. Also, select the iterative procedure which you would re-write as recursive.

  Explaining data-driven multicast routing paradigm

The data-driven multicast routing paradigm works best on local networks that have low delay and excess capacity, while the demand driven paradigm works best in a wide are environment.

  Rectangle data class and an executable program to test

For this assignment you are to create a Rectangle data class and an executable program to test

  Program-compute monthly interest-print next balance for sav

Set annual interest rate to 4% then compute monthly interest and print next balance for both savers. Then set annual interest rate 5%. Compute next month interest and print next balance for both savers.

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