add: printf exercises
This commit is contained in:
28
07-printf/exercises/02-print-your-name-and-lastname/main.go
Normal file
28
07-printf/exercises/02-print-your-name-and-lastname/main.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// For more tutorials: https://blog.learngoprogramming.com
|
||||
//
|
||||
// Copyright © 2018 Inanc Gumus
|
||||
// Learn Go Programming Course
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE: Print Your Name and LastName
|
||||
//
|
||||
// Print your name and lastname using Printf
|
||||
//
|
||||
// EXPECTED OUTPUT
|
||||
// My name is Inanc and my lastname is Gumus.
|
||||
//
|
||||
// BONUS
|
||||
// Store the formatting specifier (first argument of Printf)
|
||||
// in a variable.
|
||||
// Then pass it to printf
|
||||
// ---------------------------------------------------------
|
||||
|
||||
func main() {
|
||||
// BONUS: Use a variable for the format specifier
|
||||
|
||||
// fmt.Printf("?", ?, ?)
|
||||
}
|
Reference in New Issue
Block a user