Files
letsGO/courses/main.go
T
2026-08-31 14:57:35 -04:00

28 lines
467 B
Go

package main
import (
"fmt"
)
const (
// Create a huge number by shifting a 1 bit left 100 places.
// In other words, the binary number that is 1 followed by 100 zeroes.
Big = 1 << 100
//shoft it right 99 places
Small = Big >> 99
)
func needInt(x int) int {
return x*10 + 1
}
func needFloat(y float64) float64 { return y * 0.1 }
func main() {
fmt.Println(Small)
fmt.Println(needInt(Small))
fmt.Println(needFloat(Small))
fmt.Println(needFloat(Big))
}