2015 casino

Sum of 1000 in c#

sum of 1000 in c#

Took me 15 ms to calculate 2^ 1000 and sum the digits and less than 1 ms to Now, + + 2* c = 1000 *d' + + + c ' the most efficient way to calculate the number of digits.
I have a program which calculates the sum of the digits in the number 2 1000 . The program is not beautiful and I was hoping for some advice on how to improve it.
package com. primesum ;. public class Main {. public static void main(String args[]) {. int number = 2 ;. int count = 0 ;. long sum = 0 ;. while (count 1000 ){.
If you come across any. There is a very nice algorithm for this learnt from my maths teacher a few years ago mvbookbank.orgunately I can't recall it. Home About Us Contact Us Programmer Resources Site Map Privacy Download Software. Creating a game, from start to finish. Ok, I'll just stop here. sum of 1000 in c# Future - F*ck Up Some Commas