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
algol [13]
4 years ago
8

Develop a program that will calculate the area and perimeter of a rectangle. The length and width can be given as constant.(LENG

TH= 8 WIDTH=8).
Computers and Technology
1 answer:
o-na [289]4 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

 

  int length = 8;

  int width = 8;

 

  int perimeter = 2*(length + width);

  int area = length * width;

 

  cout<<"The perimeter is "<<perimeter<<endl;

  cout<<"The area is "<<area<<endl;

 

  return 0;

}

Explanation:

include the library iostream for using the input/output instructions in the c++ programming.

Create the main function and define the variable length and width with values.

Then, use the formula for calculating the perimeter and area of rectangle.

perimeter = 2*(length + width)

area = length * width

and store in the variables and finally print the output.

You might be interested in
What field in an IPv4 packet is altered to prioritize video streaming traffic over web surfing traffic?
Serhud [2]

Answer:

DiffServ (Differentiated Service)

Explanation:

DiffServ (Differentiated Service) field is used to prioritize traffic in IPv4 packet.

DiffServ is used as QoS (quality of service) on networks at Layer 3, replacing former IPv4 TOS field to effectively deal with the web traffic and prioritization issues starting from 1998.

3 0
4 years ago
Andy works for a TV broadcasting company. He needs to set up a network covering a small area on the work floor. However, he noti
katen-ka-za [31]
I believe it’s B)LAN

Explanation:
A LAN connects computers over a relatively short distance, allowing them to share data, files, and resources. For example, a LAN may connect all the computers in an office building, school, or hospital. Typically, LANs are privately owned and managed.
4 0
2 years ago
What may happen if a large number of computer users are trying to access a web site at the same time as you ?
Ber [7]
It Will Say " Too Many People At A Time Trying To Get In " And It Will Say Wait .
6 0
3 years ago
How do i start my trial on brainly
Shtirlitz [24]

Explanation:

just go to settings and press the first thing it shows which is subscription

3 0
3 years ago
Which of the following is a typical feature of forums but not of review sites?
kkurt [141]
Actually, two options are correct:

They allow private messaging. -  this is your safest option, as review sites don't offer private messaging (many rewiews are anonymous, so that would kill the point), but all forums do.
<span>

You need to sign up to be a member
</span>Actually, this is also true, as many, if not most forums do require you to sign up, so that it is visible whenever a certain person posts again - otherwise you won't know if you're talking to the same person! however, many review sites, for example reviewing doctors, let you post without signing in.
6 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following statements outputs the value of the gpa member of element 1 of the student array?
    5·1 answer
  • Set numMatches to the number of elements in userValues (having NUM_VALS elements) that equal matchValue. Ex: If matchValue = 2 a
    6·1 answer
  • What is the key function of a Scrum Master?
    13·1 answer
  • Jeanne writes a song, and Raul wants to perform
    6·2 answers
  • In theory, a(n) _____ can be an independent centralized database management system with proper interfaces to support remote acce
    15·1 answer
  • Which statement is LEAST accurate? Select one: a. A common reason for ERP failure is that the ERP does not support one or more i
    14·1 answer
  • 4. Use the information under the Nutrients That the Human Body Needs title to create a multilevel list. Your list should meet th
    8·2 answers
  • Type the correct answer in each box. Spell all words correctly.
    12·1 answer
  • I have no idea what I’m doing and this is due in 45 minutes
    7·1 answer
  • Question 6 options: This is a category or partitioned group of the small units of a programming language include its numeric lit
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!