fix: printf exercises
* Improvements to exercise solutions * Fix grammar in exercise
This commit is contained in:
committed by
Inanc Gumus
parent
d4a81f94e9
commit
9806e01284
@ -13,7 +13,7 @@ package main
|
|||||||
// Print your age using Prinft
|
// Print your age using Prinft
|
||||||
//
|
//
|
||||||
// EXPECTED OUTPUT
|
// EXPECTED OUTPUT
|
||||||
// My age is 30 years old.
|
// I'm 30 years old.
|
||||||
//
|
//
|
||||||
// NOTE
|
// NOTE
|
||||||
// You should change 30 to your age, of course.
|
// You should change 30 to your age, of course.
|
||||||
|
@ -10,5 +10,5 @@ package main
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("My age is %d years old.\n", 30)
|
fmt.Printf("I'm %d years old.\n", 30)
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ package main
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("Type of %d is %T\n", 3, 3)
|
fmt.Printf("Type of %d is %[1]T\n", 3)
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ package main
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("Type of %f is %T\n", 3.14, 3.14)
|
fmt.Printf("Type of %.2f is %[1]T\n", 3.14)
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ package main
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("Type of %s is %T\n", "hello", "hello")
|
fmt.Printf("Type of %s is %[1]T\n", "hello")
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ package main
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("Type of %t is %T\n", true, true)
|
fmt.Printf("Type of %t is %[1]T\n", true)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user