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
Bezzdna [24]
4 years ago
12

Given decimal variables named length and width that contain the dimensions of a rectangle, write a statement that calculates the

rectangle’s area and saves the result in a new integer variable named area. (Be sure to cast the result from decimal to integer.)
Computers and Technology
1 answer:
kirill [66]4 years ago
3 0

Answer:

The code to this question can be defined as follows:

<u>Code:</u>

int area = (int) (length * width); //defining integer variable area that holds calculated value.

Explanation:

In the given question it is defined, that two decimal variable "length and width" is defined that holds some decimal value in it, and this question asks to define an integer that holds it calculated value, which can be described as follows:

  • In the above code section, an integer variable "area" is defined, which calculates the decimal variable "length and width" multiplication.
  • Inside the area variable, the typecasting is used that converts the decimal value to integer value.  
You might be interested in
Is anyone good with auto Cad?
nydimaria [60]
Yes,I am very good with auto Cad
3 0
3 years ago
What can you hold in your left hand but not in your right? for creese7911 and maranda66
Drupady [299]

Answer:

You're right hand or Left too

Explanation:

Because some people can hold some stuff on there hands

8 0
3 years ago
Read 2 more answers
Does using interior lighting help improve a drivers visibility at night
marin [14]
No, interior lighting makes less visibility for drivers. It becomes harder to see out the window.
8 0
4 years ago
If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
mars1129 [50]

Answer:

def calculate_storage(filesize):

   block_size = 4096

   full_blocks = filesize // block_size

   partial_block = filesize % block_size

   if partial_block > 0:

       return (full_blocks + 1) * block_size

   return filesize

print(calculate_storage(1))

print(calculate_storage(4096))

print(calculate_storage(4097))

Explanation:

The python program defines the function 'calculate_storage' that calculates the block storage used. It gets the number of blocks used to store the data by making a floor division to get the integer value, then it checks for remaining spaces in the block. If there are spaces left, it adds one to the full_blocks variable and returns the result of the multiplication of the full_blocks and block_size variables.

8 0
3 years ago
To what competitive force did the printed encyclopedia industry succumb? 1. Substitute products or services 2. Increased bargain
Nikolay [14]

Answer:

Option 1 i.e., Substitute products or services.

Explanation:

The printed encyclopedia industrial sector lost to the economic power of replacing goods or services.

In the industrial countries, the current economic situation is not feasible in terms of its consumption of products as per capita. The ' service economy ' applies not only for the tertiary sector but for an economy in which businesses generate the balance of income, and most workers are also in service operations.

7 0
4 years ago
Other questions:
  • The process in which access looks for records in a table based on the fields and criteria in the query design, finds those recor
    6·1 answer
  • Edhesive 4.1 question 1
    9·1 answer
  • 2 The software needed to send an email is:
    7·1 answer
  • How does the View tab of the ribbon allow you to look at a document?
    9·1 answer
  • What technology is being used instead of Adobe flash player​
    8·1 answer
  • Which of these tax forms reports an employee's yearly social security tax withheld
    11·2 answers
  • (Java)Write a program that calculates and displays the conversion of an entered number of dollars into currency denominations—20
    11·1 answer
  • Biểu diễn cây sau bằng mảng một chiều
    12·1 answer
  • Factors to consider when selecting an operating system to install in a computer ​
    7·1 answer
  • What is the purpose of protocols in data communications?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!