Initial commit
This commit is contained in:
25
08-numbers-and-strings/02-strings/exercises/06/main.go
Normal file
25
08-numbers-and-strings/02-strings/exercises/06/main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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
|
||||
// 1. Look at the documentation of strings package
|
||||
// 2. Find a function that changes the letters into lowercase
|
||||
// 3. Get a value from the command-line
|
||||
// 4. Print the given value in lowercase letters
|
||||
//
|
||||
// INPUT
|
||||
// "SHEPARD"
|
||||
//
|
||||
// EXPECTED OUTPUT
|
||||
// shepard
|
||||
// ---------------------------------------------------------
|
||||
|
||||
func main() {
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
// 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
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(strings.ToLower(os.Args[1]))
|
||||
}
|
Reference in New Issue
Block a user