You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
355 B
Go

package main
import (
"fmt"
"log"
"git.phc.dm.unipi.it/phc/drone-example/foo"
)
func main() {
var a, b int
fmt.Printf("a = ")
if _, err := fmt.Scanln("%d", &a); err != nil {
log.Fatal(err)
}
fmt.Printf("b = ")
if _, err := fmt.Scanln("%d", &b); err != nil {
log.Fatal(err)
}
result := foo.Sum(a, b)
log.Printf("a + b = %v", result)
}