Area Calculator:  Prompt the user to enter two choices 1 or 2. If user enters 1 then ask him for length of side of square and if user enters 2 then prompt for length and breadth of rectangle. In both case the output should be the area of square (case 1) or rectangle (case2). In C++

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 5PP
icon
Related questions
Question
100%

Area Calculator: 

Prompt the user to enter two choices 1 or 2. If user enters 1 then ask him for length of side of square and if user enters 2 then prompt for length and breadth of rectangle. In both case the output should be the area of square (case 1) or rectangle (case2).

In C++

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning