answersLogoWhite

0


Best Answer

A total is a variable that accumulates the sum of several numbers.

Answer is based on C How to Program (6th Edition)

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
User Avatar

Min Htet Aung

Lvl 1
7mo ago
accomulator

Add your answer:

Earn +20 pts
Q: What is a variable that accumulates the sum of several numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What variable keeps a running total?

The answer is "an accumulator." "A running total is a sum of numbers that ACCUMULATES with each iteration of a loop. The variable used to keep the running total is called an accumulator." It can be any variable you want! It could be total, tot, etc. Here is an example: total = 0 randoms = [random.randRange(0, 99999)] * 100 # Creates a list of 100 random numbers for number in randoms: total += number print(total) # Py3k print statement. Sample output: 35460


How to Declare a variable that stores the cumulative sum java?

In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;


What do you call the result of adding two numbers?

The sum.


Write algorithm compute sum of square of N numbers?

1. Design an algorithm to compute sum of the squares of n numbers?


How. to. write an. algorthim. to find the. sum of. first. 15 natural. numbers?

Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers

Related questions

What is the sum of 65381204?

A sum is made with a combination of several numbers - a single number cannot make a sum.


What variable keeps a running total?

The answer is "an accumulator." "A running total is a sum of numbers that ACCUMULATES with each iteration of a loop. The variable used to keep the running total is called an accumulator." It can be any variable you want! It could be total, tot, etc. Here is an example: total = 0 randoms = [random.randRange(0, 99999)] * 100 # Creates a list of 100 random numbers for number in randoms: total += number print(total) # Py3k print statement. Sample output: 35460


Is the sum of a positive number and several negative numbers positive?

Possibly, but not definitely. There is no rule that determines the sign of a sum when many numbers are involved.


How do you write a program in java to read ten numbers and print sum of ten integers?

Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.


If the sum of a number and eight is doubled what equation could be used to find the numbers use n as the variable?

2(n+8)


How can you determine whether a sum of several numbers such as 13 45 24 17 is even or odd?

Add them up and divide the sum by 2.


How to Declare a variable that stores the cumulative sum java?

In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;


Can you tell if sum of several numbers will be even or odd?

Yes, all you have to do is to count the number of ODD numbers in the list. If it is odd, then the sum will be odd; if even, so will the sum. Knowing this can help you run a quick validity check when you sum up a list of numbers. (The method works because: a) the sum of two even numbers is even, and b) the sum pf two odd numbers is even, but c) the sum of an even number and an odd number is odd. Hence, if you only determine whether there are any unpaired odd numbers, you know the answer.)


How can you determine wether a sum of several numbers such as 13 45 24 17 is even or odd?

Go through each of the numbers, and count how many of them are odd. If you count an odd number of them, then their sum is odd. If you count an even number of them, then their sum is even.


List the conditions when the sum of a positive number and several negative numbers will be positive?

This is not my answer but one posted by a classmate of mine. The positive number must be greater than the absolute value of the sum of the negative numbers


What is a probability distribution for rolling 3 dice?

The answer depends on the probability distribution of WHAT variable. The variable could be the sum or the product of the three numbers, the maximum, minimum, the mean, median, number of 3s, number of primes, and so on.


Find the probability of rolling a 10 with two dice?

Assuming that the random variable is the sum of the two numbers rolled, the answer is 3/36 or 1/12.