Un cours pour se lancer dans la programmation avec le langage Go (golang).
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

main.go 1.4 KiB

1 rok temu
1 rok temu
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* Copyright (C) 2011-2023 Patrick H. E. Foubet - E2L Ivry
  2. Ecole du Logiciel Libre : https://e2li.org/
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or any
  6. later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>
  13. *******************************************************************/
  14. package main
  15. import (
  16. "fmt"
  17. "math"
  18. )
  19. var User string = "E2L !"
  20. type person struct {
  21. int
  22. }
  23. type aint int
  24. const (
  25. BigConst = math.MaxFloat64 * math.MaxFloat64
  26. data aint = 10
  27. )
  28. const (
  29. a0 = iota // 0
  30. a1 = iota // 1
  31. a2 = iota // 2
  32. a3 = iota // 3
  33. )
  34. const (
  35. b0 = iota // 0
  36. b1 // 1
  37. b2 // 2
  38. b3 // 3
  39. )
  40. const (
  41. c0 = iota // 0
  42. c1 = 43
  43. c2 = 75
  44. c3 = iota // 3
  45. )
  46. const d0 = iota //0
  47. const d1 = iota //0
  48. const d2 = iota //0
  49. const d3 = iota //0
  50. func main() {
  51. fmt.Println(a0, a1, a2, a3)
  52. fmt.Println(b0, b1, b2, b3)
  53. fmt.Println(c0, c1, c2, c3)
  54. fmt.Println(d0, d1, d2, d3)
  55. fmt.Println("Vive " + User);
  56. }