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
SOMEONE HELP PLEASE ​
exis [7]
Do what?? please tell me
3 0
3 years ago
What is one potential problem with the following loop? System.out.print("Enter integers. Enter -1 to exit."); System.out.println
iris [78.8K]

Answer:

The answer to this question can be given as  

The potential problem with the loop is it's counts when the user enters -1 from the keyboard, so the count will too many.

Explanation:

In the program there some line is missing. So the right program of the  question can be given as:  

import java.util.*;     //import package for take input from user.

public class Main     //define main class.

{

public static void main(String[] args)//define main function

{

Scanner scan=new Scanner(System.in);          //creating object.

//print values.

System.out.print("Enter integers. Enter -1 to exit.");

System.out.println(" Count of integers entered will be returned.");  

 int n=0,c=0;           //declaring integer variable.

  while (n != -1)             //loop

   {

       n = scan.nextInt();               //take input by user and hold on variable n.  

       c++;

   }

 System.out.println(c);               //print value.

}

}

output:

Enter integers. Enter -1 to exit. Count of integers entered will be returned.

-1

1  

7 0
4 years ago
The following image shows the number of orders Company A received in 2015-2020. A financial analyst wants to calculate the year-
abruzzese [7]

The step that the analyst take to apply the same formula to all adjacent years using the Macabacus’ Fast Fill Right shortcuts  is the use of the  Macabacus Excel Add-in.

<h3>What are the feature in the Formulas menu of the Macabacus Excel add-in?</h3>

The Macabacus Excel Add-in is known to be a formula auditing tools that aids  one to be able to know and correct any kinds of errors and other forms of inconsistencies in the financial models.

Note that it is one that tends to bring up the speed of the modeling process. The Excel add-in is a tool that aid the users to make some reliable links between the financial model and that of the PowerPoint or Word documents.

Hence, The step that the analyst take to apply the same formula to all adjacent years using the Macabacus’ Fast Fill Right shortcuts  is the use of the  Macabacus Excel Add-in.

Learn more about Macabacus from

brainly.com/question/1538272

#SPJ1

8 0
2 years ago
Inserting diagrams into documents can help readers better understand document text. True or False?
Masja [62]
It's true because you can get a better understanding when looking at the evidence.
4 0
3 years ago
When can screen tips be useful
Vikki [24]
Whenever honestly , what subject is this for?
6 0
3 years ago
Read 2 more answers
Other questions:
  • You are asked to install a device that will combine several connections to the Internet and provide the sum of the available net
    8·2 answers
  • Describe your microsoft word skills that need to be improved upon the most.<br><br>​
    8·1 answer
  • In the Word 2016 window, where is the Status bar located?
    11·1 answer
  • What software would you recommend for design?
    7·1 answer
  • First identify the formula to compute the sales in units at various levels of operating income using the contribution margin app
    12·1 answer
  • What is the useful chart used for comparing values over categories?​
    8·1 answer
  • Which of the following is an algorithm?
    15·2 answers
  • Which of the following is not part of the processes involved in data valida
    11·1 answer
  • You are given an integer N where 0 &lt;= N &lt;= 100, followed by another line of input which has a word W with length L where 1
    6·1 answer
  • I'll give u 16 points answer thisss
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!