Calculate the area of a circle

Assignment Help Engineering Mathematics
Reference no: EM131484531

Question: Write a program that displays the following menu:

Geometry Calculator

1. Calculate the Area of a Circle

2. Calculate the Area of a Rectangle

3. Calculate the Area of a Triangle

4. Quit

Enter your choice (1-4): If the user enters 1, the program should ask for the radius of the circle and then display its area. Use the following formula:
area  p r

2. Use 3.14159 for p and the radius of the circle for r . If the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle's area. Use the following formula:
area = length * width

If the user enters 3 the program should ask for the length of the triangle's base and its height, and then display its area. Use the following formula:

area = base * height * .5

If the user enters 4, the program should end.

Input Validation: Display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu.

Do not accept negative values for the circle's radius, the rectangle's length or width, or the triangle's base or height

Reference no: EM131484531

Questions Cloud

Evolution of residential lighting in terms : Trace the evolution of residential lighting in terms of energy conservation.
Analyse the buyer decision process : completing assessment you should be able to analyse the buyer decision process and critique effects of situational influences on consumer purchases
Find the largest and smallest number in each array : Task 1 - write a program that will create three 10 element [integer] number arrays. initialize the 3rd array with zeros at declaration time. Use the random.
Expanded research proposal containing : Submit a written Expanded Research Proposal containing the following:
Calculate the area of a circle : Write a program that displays the following menu: Geometry Calculator 1. Calculate the Area of a Circle.
Which target marketing strategy did they use : BMW is the ultimate driving machine. Which target marketing strategy did they use? What are the pros and cons for using this targeting approach?
Two different forecasting methods : Given these sales figures over the last 6 weeks, your boss needs you to test two different forecasting methods to determine which method is best
What is the primary source of revenue generation : What is the primary source of revenue generation? What is the business model?
Define security and privacy issues : Select a topic from the list and conduct research (based on literature, at least three recent research papers) and prepare a summary report.

Reviews

Write a Review

Engineering Mathematics Questions & Answers

  Prime number theorem

Dirichlet series

  Proof of bolzano-weierstrass to prove the intermediate value

Every convergent sequence contains either an increasing, or a decreasing subsequence.

  Antisymmetric relations

How many relations on A are both symmetric and antisymmetric?

  Distributed random variables

Daily Airlines fies from Amsterdam to London every day. The price of a ticket for this extremely popular flight route is $75. The aircraft has a passenger capacity of 150.

  Prepare a system of equations

How much money will Dave and Jane raise for charity

  Managing ashland multicomm services

This question is asking you to compare the likelihood of your getting 4 or more subscribers in a sample of 50 when the probability of a subscription has risen from 0.02 to 0.06.]  Talk about the comparison of probabilities in your explanation.

  Skew-symmetric matrices

Skew-symmetric matrices

  Type of taxes and rates in spokane wa

Describe the different type of taxes and their rates in Spokane WA.

  Stratified random sample

Suppose that in the four player game, the person who rolls the smallest number pays $5.00 to the person who rolls the largest number. Calculate each player's expected gain after one round.

  Find the probability density function

Find the probability density function.

  Develop a new linear programming for an aggregate production

Linear programming applied to Aggregate Production Planning of Flat Screen Monitor

  Discrete-time model for an economy

Discrete-time model for an economy

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