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
GaryK [48]
4 years ago
5

What declarations, inputs, processing, and outputs are needed to calculate the area of a rectangle?​

Computers and Technology
1 answer:
Sedbober [7]4 years ago
3 0

Answer:

Declaration: length, width, area

Inputs: length & width

Processing: length & width

Output: area

Explanation:

The area of a rectangle uses the formula: A=lw. In your coding, you need to ask for user input for the length and width in order to calculate the area.

Your processing would simplify multiple the user's input together stored in some type of sum variable.

Now I don't know what program language you are using but I will give you an idea.

<u>Code (Python)</u>

<em>#Define variables equal to user input.</em>

length = int(input("Enter the length of the rectangle: "))

width = int(input("Enter the width of the rectangle: "))

area = length * width

Your output would be the area, but you can manipulate it if you want.

print("The area of the rectangle is", area)

<u>So the program would run like this:</u>

Enter the length of the rectangle: 3 <--you type a number

Enter the width of the rectangle: 5

The area of the rectangle is 15

Sidenotes: if you are using ints, the number MUST be a whole number or the program will throw an error. If you are using decimals, use a float.

You might be interested in
Your instructor has asked you to perform some research regarding a computer OS capability of distinguishing spoken words. What i
tekilochka [14]
It’s A !!!!!!!!! Just did it
3 0
3 years ago
After assembling a computer system the very first software to be installed is​
tatyana61 [14]

Answer:

operating system is the very first

after assembling a computer system the very first software to be installed is

8 0
4 years ago
Read 2 more answers
Artificial intelligence seeks ways to improve a computer's capabilities in ____ and reasoning tasks. intellectual computational
Tatiana [17]
The answer is Computational
4 0
3 years ago
School officials want to show the percentage of students who buy lunch from the school cafeteria compared to the percentage of t
Minchanka [31]

I would say it would be (A pie chart)

6 0
3 years ago
(Financial application: compare loans with various interest rates) Write a program that lets the user enter the loan amount and
Tomtit [17]

Answer:

// Program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

#include <cmath>

using namespace std;

int main ()

{

// Variable Declarations

int years; double amount;

// Get input for loan amount and period (in years)

cout<<"Loan Amount: ";

cin>>amount;

cout<<"Number of Years: ";

cin>>years;

// Display table header

cout<<"Interest Rate Monthly Payment Total Payment";

// Calculate and display interest rates

// Start iteration

for (double i = 5.0; i <= 8; i += 0.125) {

cout<<i;

// Calculate Monthly Interest Rate

double monthlyRate = i / 1200;

// Calculate and Print Monthly Payment

double monthlyPay = amount * monthlyRate / (1 - 1 / pow(1 + monthlyRate, years * 12)); cout<<monthlyPay; cout<<"\n"<<(monthlyPay * 12) * years);

}

return 0;

}

// End of program

6 0
4 years ago
Other questions:
  • Smartphones store their operating system software in ________.
    11·1 answer
  • Please Help Fast!!!!!! Brainliest for First to answer!!! Conflict resolution is the process of solving disputes and disagreement
    5·1 answer
  • Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
    7·1 answer
  • A mobile device is freezing almost daily. The device remains powered on and the screen illuminated. The user restarts the device
    12·1 answer
  • What finger should be on the K key?<br> 1. Pinky<br> 2. Index <br> 3. Middle <br> 4. Ring
    9·1 answer
  • Consider a file/directory with the following info:
    14·1 answer
  • ANSWER ASAP! 50 POINTS!!!!
    10·2 answers
  • Help I will mark brain list I promise!!
    5·1 answer
  • What is folded card publishing?​
    5·2 answers
  • Look over the image in the top section and choose which piece from the bottom should be placed in the question mark (?) that wou
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!