Hacker Rank 30 Days Challenge in Golang
Day 0: Hello, World. Task To complete this challenge, you must save a line of input from stdin to a variable, print Hello, World. on a single line, and finally print the value of your variable on a second line.
package main import ( "fmt" "bufio" "os" ) func main() { reader := bufio.NewReader(os.Stdin) inputString, _ := reader.ReadString('\n') fmt.Println("Hello, World.") fmt.Println(inputString) } Day 1: Data Type Task Declare 3 variables: one of type int, one of type double, and one of type String.
[Read More]