Difference between revisions of "For (go lang)"

From wikieduonline
Jump to navigation Jump to search
m (Welcome moved page For (Go lang) to For (go lang))
Line 11: Line 11:
 
   for {
 
   for {
 
     sum++
 
     sum++
     fmt.Println(sum)
+
     fmt.[[Println]](sum)
 
   }
 
   }
 
  }
 
  }

Revision as of 19:56, 10 December 2021


package main

import "fmt"

func main() { 
  sum := 0

 for {
    sum++
    fmt.Println(sum)
 }
}

See also

Advertising: