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
Using selection sort, how many times longer will sorting a list of 40 elements take compared to a list of 5 elements
Hoochie [10]

It will take 8 times more time to sort a 40-element list compared to the time spent on a 5-element list.

We can arrive at this answer as follows:

  • We can see that if we divide a group of 40 elements into groups containing 5 elements, we will have 8 groups.
  • In this case, the time it would take to sort the list of one group of 5 elements would be repeated 8 times so that we could sort all the groups and their elements.

Another way to do this is to divide the number 40 by 5. We would have the number 8 as a result, which indicates that we would need 8 times more time to sort a list of 40 elements, compared to a list of 5 elements.

You can get more information about lists at this link:

brainly.com/question/4757050

5 0
3 years ago
A video game is begun by making selections from each of 3 menus. The first menu (number of players) has 4 selections, the second
lana [24]

Answer:

4 * 8 * 6 = 192

Explanation:

First menu = 4 selections

second menu = 8 selections

third menu = 6 selections

we need to find how many configuration can the game be played, we just here multiply all the selections and find the answer

4 * 8 * 6 = 192

3 0
3 years ago
Which math operator is used to show multiplication in a spreadsheet formula
Anna11 [10]

Astrix (*) is used to multiply

Example: 5*5 (the answer would come out as 25)

If you’re using Excel, do it in the formula bar of course.

8 0
3 years ago
Which of the following is an object-oriented programming language?
Svetradugi [14.3K]

Explanation:

This is the correct answer

<h3>python</h3>
7 0
2 years ago
Write an SQL statement to display the WarehouseID and the sum of QuantityOn- Hand grouped by WarehouseID. Omit all SKU items tha
schepotkina [342]

Answer:

SELECT WarehouseID, SUM(QuantityOnHand) AS TotalItemsOnHandLT3

FROM INVENTORY

WHERE QuantityOnHand < 3

GROUP BY WarehouseID

ORDER BY TotalItemsOnHandLT3 DESC;

Explanation:

SELECT statement is used to select the columns from the table. Here the columns displayed by SELECT are WareHouseID, Sum of QuantityOnHand which is named as TotalItemsOnHandLT3  using AS which is called alias which is a temporary name to represent one or columns. WHERE clause here depicts a condition that omits all SKU items that have three or more items on hand from the sum. GROUP BY is used to group the resultant set by one or more columns like here it is grouped by WarehouseID. ORDER BY is used to display the result of TotalItemsOnHandLT3  column in descending order.

7 0
4 years ago
Other questions:
  • Playstation network live updates pes 2018 does it cost extra
    13·1 answer
  • ∑_(A,B,C,D,E)▒〖(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30)〗
    8·1 answer
  • A device in electricity that is analogous to a restriction in a water pipe is:
    11·1 answer
  • We are committed to creating and cultivating a graduate and postdoctoral community that values and respects individuals, regardl
    11·1 answer
  • Secops focuses on integrating the need for the development team to provide iterative and rapid improvement to system functionali
    14·1 answer
  • When and how should internet service providers be allowed to treat some kinds of internet traffic different from others?
    7·1 answer
  • What are workplace human relations
    10·1 answer
  • 1. Define what grasslands are ?
    14·2 answers
  • The process of recording and reporting the financial data for a business is known as:
    6·2 answers
  • your organization has decided to use dhcp for ipv6. you want all windows 10 systems using ipv6 to get all of their tcp/ip inform
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!