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
gregori [183]
3 years ago
6

This code snippet is intended to calculate the balance of an account after twenty years of gaining interest. Select the statemen

t that correctly completes the loop.
int years = 20;
double balance = 10000;
while (years > 0)
{
__________
double interest = balance * rate / 100;
balance = balance + interest;
}
Computers and Technology
1 answer:
Firlakuza [10]3 years ago
8 0

Answer:

The answer to this question is the "years--;".

Explanation:

In the given question code the if we define the years--; and the rate of interest in the code so this program will return a value for example if we give rate of interest or rate to value 5 then the output of the code is 26532.977051  because it returns the double that is a floating-point value.  So the missing code for this question is "years--;".

 

You might be interested in
When did Microsoft released MS-Word 2016? S When did Microsoft released MS - Word 2016​
Pepsi [2]

Answer:

July 9, 2015

Explanation:

It was released on macOS on July 9, 2015, and on Microsoft Windows on September 22, 2015, for Office 365 subscribers. Mainstream support ended on October 13, 2020, and extended support for most editions of Office 2016 will end on October 14, 2025, the same day as Windows 10.

3 0
1 year ago
g You and your friend both send documents to the printer, but the printer can only print one document at a time. What does it do
Sedbober [7]

Answer:

It places the document in a buffer

Explanation:

Since the printer can only print a document at a time, the other document is going to be placed in a buffer.

The print buffer can be described as a location in memory that has the function of holding data that is going to be sent to a computers printer. A print job such as in this scenario may remain in the buffer because another document is to be printed first.

Sometimes a document could be put in the buffer because the computer is waiting for the printer to respond. This is just another reason why documents are placed in a buffer.

5 0
3 years ago
Two numbers are given (numbers are entered from the keyboard). If both numbers are positive, then output their sum, if both numb
AleksAgata [21]

Answer:

The program in Python is as follows:

num1 = int(input())

num2 = int(input())

if num1 >=0 and num2 >= 0:

   print(num1+num2)

elif num1 <0 and num2 < 0:

   print(num1*num2)

else:

   if num1>=0:

       print(num1**2)

   else:

       print(num2**2)

Explanation:

This gets input for both numbers

num1 = int(input())

num2 = int(input())

If both are positive, the sum is calculated and printed

<em>if num1 >=0 and num2 >= 0:</em>

<em>    print(num1+num2)</em>

If both are negative, the products is calculated and printed

<em>elif num1 <0 and num2 < 0:</em>

<em>    print(num1*num2)</em>

If only one of them is positive

else:

Calculate and print the square of num1 if positive

<em>    if num1>=0:</em>

<em>        print(num1**2)</em>

Calculate and print the square of num2 if positive

<em>    else:</em>

<em>        print(num2**2)</em>

3 0
2 years ago
What is the name of this tool and what can it be used for?<br> Thanks!!
Iteru [2.4K]
That is a corqet tool it is used for fixing tires
6 0
3 years ago
Jeff’s father is installing a do-it-yourself security system at his house. He needs to get a device from his workshop that conve
Alenkasestr [34]

Answer:

Beeper

Explanation:

A buzzer pr beeper, as security device, converts electrical energy to sound energy.

3 0
3 years ago
Other questions:
  • When purchasing a(n) ________ computer, having cellular as well as wifi can be important?
    9·1 answer
  • Unix/linux are ____ systems, which let many people simultaneously access and share the resources of a server computer.
    13·1 answer
  • Consider this data sequence: "fish bird reptile reptile bird bird bird mammal fish". let's define a singleton to be a data eleme
    5·1 answer
  • Mary is writing an article about the software development life cycle. She wants to place a flowchart besides the text. Which men
    6·2 answers
  • Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2
    7·1 answer
  • What is one advantage and disadvantage of designing a support security that might be based on a centralized model, where all sen
    11·1 answer
  • How did the use of ARPANET change computing?
    14·1 answer
  • Name:
    13·1 answer
  • Which is government departments fund the Global Positioning System
    6·1 answer
  • Suppose your team is finishing a project and the supervisor stresses ensuring the material cannot be erased. To what memory leve
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!