add: new input scanning exercises

This commit is contained in:
Inanc Gumus
2019-05-07 12:17:07 +03:00
parent 6be081ef84
commit 556e99f186
17 changed files with 254 additions and 6 deletions

View File

@@ -0,0 +1,41 @@
package main
// ---------------------------------------------------------
// EXERCISE: Log Parser from Stratch
//
// You've watched the lecture. Now, try to create the same
// log parser program on your own. Do not look at the lecture,
// and the existing source code.
//
//
// EXPECTED OUTPUT
//
// go run main.go < log.txt
//
// DOMAIN VISITS
// ---------------------------------------------
// blog.golang.org 30
// golang.org 10
// learngoprogramming.com 20
//
// TOTAL 60
//
//
// go run main.go < log_err_missing.txt
//
// wrong input: [golang.org] (line #3)
//
//
// go run main.go < log_err_negative.txt
//
// wrong input: "-100" (line #3)
//
//
// go run main.go < log_err_str.txt
//
// wrong input: "FOUR" (line #3)
//
// ---------------------------------------------------------
func main() {
}