// Homework 18, challenge: Sum 1..N. // // Prompt for a positive whole number n. Compute 1 + 2 + ... + n with a // for loop and a running total. Print: // Sum from 1 to N is S // Then print the result of n * (n + 1) / 2 on the next line to confirm // the two match. // // You need more packages. Change the import line to: // import ( // "bufio" // "fmt" // "os" // "strconv" // "strings" // ) // // Run with: go run exercises/18/homework/04-sum-1-to-n.go package main import "fmt" func main() { // TODO: write your code here, in place of this placeholder line: fmt.Println("TODO: replace this line") }