answersLogoWhite

0

The sum of integer for 0?

Updated: 12/20/2022
User Avatar

Bullybreedlover1

Lvl 1
9y ago

Best Answer

It is 0.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: The sum of integer for 0?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the sum of the first 10 positive integers?

what is the sum of the first 10 positive integers? To me, if you include 0 as the first integer, then the tenth integer is 9 and the sum is 45. If you don't include 0, the tenth integer is 10, and the sum is 55.


What is an easy rule of divisibility for 11?

Sum the digits in the odd positions in the integer. Sum = XSum the digits in the even positions in the integer. Sum = YIf X - Y is a multiple (including negative or 0), then the given integer is divisible by 11.


How do you write while andfor loop to get sum of1to100 integer?

int i, sum; /* example using while */ sum = 0; i = 1; while (i <= 100) { sum += i; ++i; } /* example using for */ sum = 0; for (i = 1; i <= 100; ++i) sum += i;


Java code to average and total a set of numbers?

The below method is written in the assumption that, the n numbers are sent as an ArrayList of Integer values. public void computeSumAndAvg(ArrayList lst){ Iterator itr = lst.iterator(); int sum = 0; float average = 0; int count = 0; while(itr.hasNext(){ Integer val = (Integer) itr.next(); sum = sum + val.intValue(); count++; } average = sum/count; System.out.println("Sum is: " + sum) ; System.out.println("Average is: " + average) ; }


What is the sum of smallest and largest 5 digit whole number?

The smallest 5 digit integer is -99999. The largest 5 digit integer is 99999. The sum is therefore 0.


What is the C plus plus program to print the sum of all squares from 1 to n?

#include<iostream> #include<sstream> using namespace std; unsigned sum_of_squares (const unsigned max) { if (max==0) return 0; if (max==1) return 1; return sum_of_squares (max-1) + (max*max); } int main () { unsigned num = 0; while (1) { cout << "Enter a positive integer (0 to exit): "; string s; cin >> s; if (s[0]=='0') break; stringstream ss; ss << s; if (ss >> num) { cout << "The sum of all squares from 1 to " << num << " is: " << sum_of_squares (num) << endl; continue; } cerr << "Invalid input: " << s << endl; } cout << "Quitting..." << endl; } Example output: Enter a positive integer (0 to exit): 1 The sum of all squares from 1 to 1 is: 1 Enter a positive integer (0 to exit): 2 The sum of all squares from 1 to 2 is: 5 Enter a positive integer (0 to exit): 3 The sum of all squares from 1 to 3 is: 14 Enter a positive integer (0 to exit): 4 The sum of all squares from 1 to 4 is: 30 Enter a positive integer (0 to exit): 5 The sum of all squares from 1 to 5 is: 55 Enter a positive integer (0 to exit): 6 The sum of all squares from 1 to 6 is: 91 Enter a positive integer (0 to exit): 7 The sum of all squares from 1 to 7 is: 140 Enter a positive integer (0 to exit): 0 Quitting...


The sum of a positive integer?

sum of positive integers will be a positive integer


When is the sum of a positive and negative integer positive?

When the positive integer is farther from 0 than the negative integer, example -4+5=1 why? the -4 is 4 places to the left of the 0 and the 5 is 5 places to the right.


What is the sum of the smallest prime number and the largest negative even integer?

2+(-2) =0


Is the sum of a positive and negative integer always negative?

No. The sum of a positive integer and a negative integer has the same sign as the larger integer.


When is the sum of a positive integer and a negative integer positvie?

The sum of a positive integer and a negative integer is positive when the positive integer is greater. For example: 9 + (-5) = 4 In this case, the positive integer 9 is greater than the negative integer 5. Therefore, the sum is positive.


The sum of two integers is an integer?

Yes the sum of two integers will always be an integer.