update: log parser dir to input scanning

This commit is contained in:
Inanc Gumus
2019-05-05 18:23:52 +03:00
parent 1f4776b143
commit a40dc5b0a9
22 changed files with 56 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
package main
// ---------------------------------------------------------
// EXERCISE: Uppercaser
//
// Use a scanner to convert the lines to uppercase, and
// print them.
//
// 1. Feed the shakespeare.txt to your program.
//
// 2. Scan the input using a new Scanner.
//
// 3. Print each line.
//
// EXPECTED OUTPUT
// Please run the solution to see the expected output.
// ---------------------------------------------------------
func main() {
}

View File

@@ -0,0 +1,12 @@
come night come romeo come thou day in night
for thou wilt lie upon the wings of night
whiter than new snow on a raven's back
come gentle night come loving black-browed night
give me my romeo and when he shall die
take him and cut him out in little stars
and he will make the face of heaven so fine
that all the world will be in love with night
and pay no worship to the garish sun
oh i have bought the mansion of love
but not possessed it and though i am sold
not yet enjoyed

View File

@@ -0,0 +1,23 @@
// 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 (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
in := bufio.NewScanner(os.Stdin)
for in.Scan() {
fmt.Println(strings.ToUpper(in.Text()))
}
}

View File

@@ -0,0 +1,12 @@
come night come romeo come thou day in night
for thou wilt lie upon the wings of night
whiter than new snow on a raven's back
come gentle night come loving black-browed night
give me my romeo and when he shall die
take him and cut him out in little stars
and he will make the face of heaven so fine
that all the world will be in love with night
and pay no worship to the garish sun
oh i have bought the mansion of love
but not possessed it and though i am sold
not yet enjoyed