add: new input scanning exercises
This commit is contained in:
@@ -10,8 +10,8 @@ package main
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE: Unique Words
|
||||
//
|
||||
// Create a program that counts the unique words from an
|
||||
// input stream.
|
||||
// Create a program that prints the total and unique words
|
||||
// from an input stream.
|
||||
//
|
||||
// 1. Feed the shakespeare.txt to your program.
|
||||
//
|
||||
@@ -21,8 +21,13 @@ package main
|
||||
//
|
||||
// 4. Count the unique words using a map.
|
||||
//
|
||||
// 5. Print the total and unique words.
|
||||
//
|
||||
//
|
||||
// EXPECTED OUTPUT
|
||||
//
|
||||
// There are 99 words, 70 of them are unique.
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
|
||||
func main() {
|
||||
|
Reference in New Issue
Block a user