Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Write a single program to complete all parts. Part A Determine if two rectangles have the same area. 1. Prompt the user to enter

c++ image text in transcribed
image text in transcribed
Write a single program to complete all parts. Part A Determine if two rectangles have the same area. 1. Prompt the user to enter the width and length for two different rectangles as whole numbers, storing the input into integer variables. 2. Calculate and store the area of each rectangle. 3. Compare the two areas and output a message indicating if the areas are equal or not equal. Part B 1. Prompt the user to enter a numeric pH value for a solution and then output a description of the acidity of the solution. 2. Input and store the user input into an integer variable. 3. Your output is a description of the acidity of a solution of that pH, based on the following table: pH range Solution is very acidic >= 3 and and = 12 very alkaline Work in this order, testing each step before proceeding. Prompt for an input a pH value, storing it in an integer variable. Write an if/else statement with boolean expressions that compare the stored pH value to each range and outputs the solution description for each. For example, the first part of your statement will be: if (pH = 3 and = 3 and

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions