Last active
May 8, 2022 11:56
-
-
Save adeleke5140/fcd57f97ba12199aee18d5753621041c to your computer and use it in GitHub Desktop.
Read input from STDIN and print Output to STDOUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// import the required packages | |
import ( | |
"fmt" | |
"bufio" | |
"os" | |
) | |
func main { | |
//read the input ans save to a reader variable | |
reader := bufio.NewReader(os.Stdin); | |
//get the message and skip the error | |
message, _ := reader.ReadString('\n); | |
fmt.Println("Hello, World.") | |
fmt.Println(message) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment