Instantly share code, notes, and snippets.

# Crilou

• Sort options
Created Nov 23, 2018
Mars Lander
View Mars Lander
 case Y>Ymin && vSpeed>vSpeedmin && abs(hSpeed)(landhere+breakdist): vitesse = 4 angle = anglego case Y>Ymin && X<((landhere.Y+landhere.X)/2-breakdist) && hSpeed==0: Strategie = "go" case Y>Ymin && X<((landhere.Y+landhere.X)/2-breakdist) && hSpeed>0 && vSpeed > vSpeedmin: Strategie = "go"
Created Nov 20, 2018
MARS LANDER 2
View Mars Lander 2
 package main import "fmt" //import "os" type XY struct { X int Y int } func main() { var surfaceN int fmt.Scan(&surfaceN)
Created Nov 8, 2018
RELUE
View RELUE
 // package main import "fmt" func main() { var total int var n int = 1000/3 for i:=1; i
Last active Nov 5, 2018
BATMAN
View BATMAN
 package main import "fmt" //import "math" //import "os" type AB struct { A int B int }
Last active Nov 4, 2018
String
View String
 import "strings" import "strconv" Atoi (string=>int) if s, err := strconv.Atoi(v); err == nil {} Itoa (int=>string) s := strconv.Itoa(i) Contains ?
Created Nov 3, 2018
Go=>Array+Slices
View Array_Slice
 func whereismymin(Slice []float64) int { var N int = len(Slice) var min float64 = Slice[0] var posmin int for i:=1 ; i
Last active Nov 4, 2018
Go Fast and Furious
View Go Basics
 //Déclaration de valeur var N int = 1 var i, j int = 1, 2 var Slice []int = [1] //Conversion var a float64 = float64(b) a:= float64(b) var a uint = uint(f)
Last active Nov 3, 2018
Math
View Fonction de base
 //VALEUR ABSOLUE SUR ENTIER func abs(n int) int { if n < 0 { return -n } return n }
You can’t perform that action at this time.