ryochack
4/21/2013 - 8:23 AM

sum_simple.go

package main

import (
	"fmt"
	"time"
)

func main() {
	const num = 100000

	sum := 0
	for i := 0; i < num; i++ {
		time.Sleep(1 * time.Millisecond)
		sum += i
	}
	fmt.Println(sum)
}