Sum = Sum + first number Sum = Sum + second number Sum = Sum + third number Average = 1/3 x Sum
to print the sum of first ten numbers:- void main() {int i,sum; sum=0; while(i<=10) sum=sum+i; i=i+1; } printf("The sum is : %d",sum); }
The following will sum all integers from 1-100. Adjust according to your needs.int sum = 0;for (int i = 1; i
The difference between the Class 365 and Class 465, 466 is basically the cost.
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;
It is: 23
1,257
365
122 + 112 + 102 = 365 144 + 121 + 100 =365 To get this answer I used the guess and check method.
198+65= ?
367
1 + 5 + 7 + 35 + 73 + 365 + 511 + 2555 = 3,552
In Mathematica: Sum[((365!/(365 - k)!)) * k * StirlingS2[N, k], {k, 1, N}] / 365^N StirlingS2 is a Stirling Number of the Second Kind: http://en.wikipedia.org/wiki/Stirling_number_of_the_second_kind Or you could just do 365*(1- (364/365)^N) LOLZ.
It is: CCCLXV = 365 P.s: "C" = 100 (there are three) "L" = 50 (there is one "X" = 10 (there is one) "V" = 5 (there is one) Add 'em together and your sum is 365.
In a span of 1000 years, there are 750 years equal to 365 days. The sum of minutes in these years is equal to 60 x 24 x 365 x 750 = 394200000 minutes.There are 250 years equal to 366 days. The sum of minutes in these years is equal to 60 x 24 x 365 x 250 = 131400000 minutes.The sum of both of these values is 525,600,000. Therefore, accounting for leap years, there are 525,600,000 minutes in one thousand years.
x^2 + (x+1 )^2 =365 x^2 +x^2 + 2x +1 =365 2x^2 + 2x = 364 x^2 + x = 182 = (x- 13)(x + 14) x =13, so integers are 13 and 14, squares 169 and 196, which total 365.
365 times 365 equals 133,225.