Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "fmt"
- import "os"
- import "strconv"
- import "time"
- const iName string = "Iein"
- type person struct {
- age int;
- firstName string;
- }
- func nfact(n int) (r int) {
- if n == 1 {
- r = 1
- } else {
- r = n * nfact(n-1)
- }
- return r;
- }
- func main() {
- var p = new(person);
- p.age = 34;
- p.firstName = "iein valdez";
- fmt.Println("Hello world");
- fmt.Println("from " + iName);
- fmt.Println(os.Geteuid);
- fmt.Println("Page size is: " + strconv.Itoa(os.Getpagesize()));
- fmt.Println("Time is: " + time.LocalTime().String());
- fmt.Println("Person is " + p.firstName + " age is " + strconv.Itoa(p.age));
- fmt.Println(strconv.Itoa(nfact(4)));
- }
Add Comment
Please, Sign In to add comment