Difference between revisions of "For (go lang)"
Jump to navigation
Jump to search
(Created page with " <pre> package main import "fmt" func main() { sum := 0 for { sum++ // repeated forever fmt.Println(sum) } } </pre> == See also == * {{go}}") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
− | + | [[package]] main | |
− | package main | + | |
− | + | [[import]] "[[fmt]]" | |
− | import "fmt" | + | |
− | + | [[func]] [[main]]() { | |
− | func main() { | + | sum := 0 |
− | sum := 0 | + | |
− | + | for { | |
− | + | sum++ | |
− | + | fmt.[[Println]](sum) | |
− | + | } | |
} | } | ||
− | |||
− | |||
== See also == | == See also == | ||
* {{go}} | * {{go}} | ||
+ | |||
+ | [[Category:Programming]] |
Latest revision as of 19:56, 10 December 2021
Advertising: