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
Plz I need the answer!!!:(
dimaraw [331]

Answer:

Procedural, Visual, Logic - Based

Explanation:

7 0
3 years ago
True or false A thesaurus is a brunch of commands grouped together as a single command used to automate task
Nina [5.8K]

False a thesaurus are a list of synonyms or antonyms

4 0
3 years ago
When can design templates be applied to the presentation?
Sophie [7]

Answer:

when you add a new slide

Explanation:

I think it's correct

8 0
3 years ago
C) Explain GIGO briefly.​
hodyreva [135]

Answer:

Is is also a computer science acronym that implies bad input will result in bad output. Requiring valid input also helps programs avoid errors that can cause crashes and other erratic behavior.

IT'S FORMULA IS GIGO: GARBAGE IN GARBAGE OUT...

HOPE IT'S HELPFUL FOR U!!

AND PLZ MARK ME AS BRAINLIEST IF U LIKE THIS ANSWER!!!!

4 0
4 years ago
Is Flip book drawings, frame by frame (need great drawing skills).
lyudmila [28]
I would say traditional animation
7 0
3 years ago
Other questions:
  • David needs to create a password. He uses "rtjjkliusfvwr." Which of the following best explains the weakness in his password?
    9·2 answers
  • Why do most programmers indent the conditionally executed statements in a decision structure?
    7·1 answer
  • ____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
    9·1 answer
  • Write a program named SortWords that includes a method named SortAndDisplayWords that accepts any number of words, sorts them in
    10·1 answer
  • The statement which assigns value to variable is called a........................statement in c++
    11·1 answer
  • Viruses and worms can affect a system by:
    11·2 answers
  • What tag is used to contain information about a web page, such as the title and related pages?
    12·1 answer
  • Just took a test and I got 5 wrong and I wanted to know the correct answers
    10·1 answer
  • Which important aspect of the Roman Empire did the barbarians destroy?
    14·2 answers
  • A ________________ is a special type of array that implements a last-in, first-out collection of values.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!