add: numbers and strings exercises

This commit is contained in:
Inanc Gumus
2018-10-27 17:15:23 +03:00
parent c37cf60701
commit 9646e16137
36 changed files with 75 additions and 22 deletions

View File

@ -0,0 +1,30 @@
// 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: ToLowercase
//
// 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
//
// HINT
// Check out the strings package from Go online documentation.
// You will find the lowercase function there.
//
// INPUT
// "SHEPARD"
//
// EXPECTED OUTPUT
// shepard
// ---------------------------------------------------------
func main() {
}

View File

@ -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]))
}