1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lara [203]
3 years ago
8

Write a program in c++ that calculate the area and perimeter of a rectangle

Computers and Technology
1 answer:
jasenka [17]3 years ago
7 0

Answer:

c++

Explanation:

using namespace std;

class areaPerimeter

{

   private:

       float len;

   public:

       void getData();

       float findArea();

       float findPerimeter();

};

void CodesCracker::getData()

{

   cout<<"Enter the Length of Square: ";

   cin>>len;

}

float CodesCracker::findArea()

{

   return (len*len);

}

float CodesCracker::findPerimeter()

{

   return (4*len);

}

int main()

{

   CodesCracker c;

   float area, per;

   c.getData();

   area = c.findArea();

   per = c.findPerimeter();

   cout<<"\nArea = "<<area;

   cout<<"\nPerimeter = "<<per;

   cout<<endl;

   return 0;

}

You might be interested in
Write a converter program for temperatures. This program should prompt the user for a temperature in Celsius. It should then con
Aleksandr [31]

Answer:

c = float(input("Enter the temperature in Celsius: "))

f = c * 1.8 + 32

print("The temperature in Fahrenheit: " + str(f))

k = (f - 32) / 1.8 + 273.15

print("The temperature in Kelvin: " + str(k))

Explanation:

*The code is in Python.

Ask the user to enter the temperature in Celsius

Convert the Celsius to Fahrenheit using the conversion formula and print it

Convert the Fahrenheit to Kelvin using the conversion formula and print it

3 0
3 years ago
Which of the following should get a Page Quality (PQ) rating of Low or Lowest?
Luda [366]

Answer:

A page that gets a Didn't Load flag

Pages with an obvious problem with functionality or errors in displaying content

Explanation:

The main reason why a page gets Page Quality rating Low/Lowest is if it can't be shown for one reason or another.

A page with mismatch between the location of the page and the rating location, does have a mismatch but some form of a page is shown.

A file type other than a webpage displays that specific file type in a page framework, so page is shown

Other two do not show a page, so they will get a PQ rating Low/Lowest

7 0
4 years ago
What can u access various sites on
Klio2033 [76]
Search engines. (I'm Misty btw if you want to know)
3 0
3 years ago
HELP ME ASAP PLS BEING TIMED
kkurt [141]

Answer:

It would be considered cheating.

Explanation:

Any type of electronic use is considered cheating because you can look up the answers on the same phone or text someone for the answer. And so, Text messaging during a test is cheating because of the fact that is convenient to the cheater and not convenient to the teacher that is grading.

8 0
4 years ago
Read 2 more answers
A telecom company wants to extend their horizontal cables over a distance of 510 meters. Which cable should they use?
Volgvan
They should use fiber cable because it is faster and more reliable
8 0
4 years ago
Other questions:
  • Why has unicode become the standard way of converting binary to text??
    8·1 answer
  • Is anyone familiar in drawing flow charts for c++ programming
    14·1 answer
  • Which icon will automatically adjust the amount of space between letters from very tight to very loose in style? Hyphenation, Te
    6·2 answers
  • Given the commands below, what do they do? for (position = 1 through aList.getLength()/2) { a = aList.getEntry(aList.getLength()
    11·1 answer
  • We must know the Inflation Rate and the Nominal GDP in order to calculate Real GDP.
    15·1 answer
  • Find the range of the function for the domain<br>(-4,-2,0, 1.5,4).<br>f(x) = 5x²+ 4<br>​
    13·1 answer
  • Identify traits of entrepreneurs. Check all of the boxes that apply.
    11·1 answer
  • A high school in a low-income area offers special programs to help students acquire the technical skills needed to find jobs as
    12·1 answer
  • What is the use of technology to enable people to learn anytime and anywhere​
    13·1 answer
  • A natural language processor reads the sentence The walk was tiring and mistakes the noun “walk” as a verb. What is such an erro
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!