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
Ahat [919]
3 years ago
9

considering that two variables counters and accumulators are important in loop design. What would be their purpose?

Computers and Technology
1 answer:
almond37 [142]3 years ago
5 0

Answer:

Counters are used to run the loop.

Accumulators are used to calculate and store the result.

Explanation:

In loops variables counters and accumulators are very important.The counter variable is used to increase the loop or move to the next iteration.

The accumulator variable is used to calculate and store the result of an operation in the loop.

For example:-

int i=0;

int sum=0;

while(i<7)

{

     sum=sum+i;

     i++;

}

In this while loop the counter variable is i and the accumulator variable is sum.Without the counter variable is not increased the loop will keep looping over the same value of i that is 0.

In the loop the accumulator variable sum is used to calculate the sum of integers form i=0 to 6.

You might be interested in
Write a program in Python that reads in investment amount, annual interest rate, and number of years, and displays the future in
pickupchik [31]

Answer:

investmentAmount = float(input("enter the investment amount: "))

annualInterestRate = float(input("enter the Annual Interest Rate: "))

numYears = int(input("Enter NUmber of Years: "))

monthlyInterestRate = annualInterestRate/12

futureInvestmentValue = investmentAmount * (1 + monthlyInterestRate)*(numYears*12)

print("The Future Investment Value is: ")

print(futureInvestmentValue)

Explanation:

Using python programming language as required, we use the input function to prompt user for inputs for each of the variables.

There is a conversion from the variable annualInterestRate  to monthlyInterestRate before the formula for the futureInvestmentValue is applied

4 0
3 years ago
What is the build in libary function to compare two strings?​
worty [1.4K]

Answer:

strcmp() is a built-in library function and is declared in <string. h> header file. This function takes two strings as arguments and compare these two strings lexicographically.

Explanation:

Hope it helps

3 0
3 years ago
What port does rdp use by default and from what range of numbers should you select a private port number?
VARVARA [1.3K]
The default RDP port is 3389 but can be configured in the range of <span>49152-65538</span>
5 0
3 years ago
What is also known as a visual aid in a presentation
kari74 [83]

the answer is slide

I took notes off of plato and it quoted word for word

A slide is a visual aid, also known as a single screen of presentation

:) hope this helps

5 0
3 years ago
Read 2 more answers
Match each code snippet to its appropriate markup language name
Mazyrski [523]

Answer:

Please find the complete solution in the attached file.

Explanation:

8 0
3 years ago
Other questions:
  • Which IPv6 transition technology can be used with NAT routers and has the address prefix 2001::32?
    10·1 answer
  • Which tab provide text formatting features
    11·1 answer
  • Which data type or collection of data types can SOQL statements populate or evaluate to?
    9·1 answer
  • You would like to put the data in order by product number. What should you do?
    15·1 answer
  • True/False/Unknown. For the interpretation of function calls, we assign the formal parametersto the valuations of the actual arg
    11·1 answer
  • What are the 4 features of the month-end review tool in quickbooks online accountant?
    14·1 answer
  • What is a trojan horse
    8·2 answers
  • Microsoft word 2010 lab 6-1
    7·2 answers
  • Who ever can get me the lyrics to raining tacos will get 46 points + the crown! i want the song!
    10·2 answers
  • 2
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!