Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExamplePrintf (0.1 sec)

  1. src/fmt/example_test.go

    	const name, age = "Kim", 22
    	fmt.Println(name, "is", age, "years old.")
    
    	// It is conventional not to worry about any
    	// error returned by Println.
    
    	// Output:
    	// Kim is 22 years old.
    }
    
    func ExamplePrintf() {
    	const name, age = "Kim", 22
    	fmt.Printf("%s is %d years old.\n", name, age)
    
    	// It is conventional not to worry about any
    	// error returned by Printf.
    
    	// Output:
    	// Kim is 22 years old.
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 21:03:10 UTC 2019
    - 11.8K bytes
    - Viewed (0)
Back to top