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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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