Write a program to calculate the area of a rectangle based on the length and width...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to calculate the area of a rectangle based on the length and width provided as input by the user. After calculating the area, display a message to the user indicating whether or not the rectangle is a square. Match the output in the examples below. Example 1: Enter the length and width space separated: 2 2 The area is: 4 It is a square. Example 2: Enter the length and width space separated: 3 6 The area is: 18 It is not a square. Write a program to calculate the area of a rectangle based on the length and width provided as input by the user. After calculating the area, display a message to the user indicating whether or not the rectangle is a square. Match the output in the examples below. Example 1: Enter the length and width space separated: 2 2 The area is: 4 It is a square. Example 2: Enter the length and width space separated: 3 6 The area is: 18 It is not a square.
Expert Answer:
Answer rating: 100% (QA)
include using namespace std int main double length width I... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
A company supplies concrete slabs for paving. The slabs are made to order in batches of 20; all slabs in a batch are identical. Customers can order from a small range of standard sizes and colours....
-
Prepare the journal entries for 2, 4, 6, 8, 12 and 14 using the following information 6% bonds $1200000 par value payable in 5 years were issued for cash at 108, any premium is to be transferred to...
-
Joan is the operations manager at Dark Light Communications, a services company. She has been told that the Operations function needs to pay more attention to the "service package" in order to be...
-
An adiabatic air compressor is to be powered by a direct-coupled adiabatic steam turbine that is also driving a generator. Steam enters the turbine at 12.5 MPa and 500oC at a rate of 25 kg/s and...
-
The 2014-T6 aluminum hollow section has the cross section shown. If the column is fixed at its base and pinned at its top, and is subjected to the axial force \(P=100\) kip, determine the maximum...
-
Transactions that affect earnings do not necessarily affect cash. Identify the effect, if any, that each of the following transactions would have upon cash and net income. The first transaction has...
-
BIG Construction (BC) is building a bridge for $40 million at a total cost of $34 million over the next three years. The company uses percentage of completion method to recognize revenue. Below is a...
-
How would you detect the distribution of the constituents of human hair with a diameter of about 80 m using methods of vibrational spectroscopy? Describe the use of at least two different approaches;...
-
A metallic right circular cone 20 cm high and whose vertical angle is 60 is cut into two parts at the middle of its height by a plane parallel to its base. If the frustum so obtained is drawn into a...
-
Extend the AVL tree implementation discussed in this chapter to support node deletion. In particular, modify the DeleteItem method of the TreeType class and the helper function Delete (originally...
-
Write a Matlab program to plot the samples of the solutions of the difference equations in Exercise 1.9 from \(n=0\) to \(n=20\). Exercise 1.9 Find one solution for each of the difference equations...
-
Suppose we want to process the continuous-time signal \[x_{\mathrm{a}}(t)=3 \cos (2 \pi 1000 t)+7 \sin (2 \pi 1100 t)\] using a discrete-time system. The sampling frequency used is 4000 samples per...
-
Choose a brand that someone in your family uses. Describe the demographics of this family member. For example, if writing about your mom, you might write, Woman in her 50s, with a household income of...
-
Show that \(X_{\mathrm{i}}(\mathrm{j} \Omega)\) in Equation (1.170) is a periodic function of \(\Omega\) with period \(2 \pi / T\).
-
ABC Dealing is a business owned and run by Alan B Crick. Whilst the following events took place in the first few days of this month, ledger accounts have not yet been written up and that will...
-
QUESTION 2 The CEO of Farisha Hijab Sdn Bhd insisted on further investigation to be carried out that he also required Mr Muaz to conduct the analysis of variance for the material and labour of the...
-
Find the maximum height for the particle in the preceding example.
-
Find two different Taylor series to represent the function f(x) = 1/x such that one series is f(x) = a 0 + a 1 (x 1) + a 2 (x 1) 2 + and the other is f(x) = b 0 + b 1 (x 2) + b 3 (x 2) 2 + ...
-
Find the following derivatives. All letters stand for constants except for the dependent and independent variables indicated: a. dy/dx, where y = (ax 2 + bx + c) 3/2 . b. d ln (P)/dT, where P = ke...
-
You are analyzing bids from two companies. Company A has scored 85 points on the quality evaluation (out of a scale of 100 points), while company B has scored 95 points. The overall weighting your...
-
You are reviewing a tender evaluation that is to be awarded on lowest total price. The bid evaluations follow: To which company should the contract be awarded? Company Capital Cost Maintenance...
-
A tender evaluation method specifies 30% price and 70% quality. What is the weighted score of a tender that scored 80 points (out of 100) for price and 60 for quality?
Study smarter with the SolutionInn App