add: if statement exercises
This commit is contained in:
32
11-if/exercises/03-arg-count/main.go
Normal file
32
11-if/exercises/03-arg-count/main.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// 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
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE: Arg Count
|
||||
//
|
||||
// 1. Get arguments from command-line.
|
||||
// 2. Print the expected outputs below depending on the number
|
||||
// of arguments.
|
||||
//
|
||||
// EXPECTED OUTPUT
|
||||
// go run main.go
|
||||
// Give me args
|
||||
//
|
||||
// go run main.go hello
|
||||
// There is one: "hello"
|
||||
//
|
||||
// go run main.go hi there
|
||||
// There are two: "hi there"
|
||||
//
|
||||
// go run main.go i wanna be a gopher
|
||||
// There are 5 arguments
|
||||
// ---------------------------------------------------------
|
||||
|
||||
func main() {
|
||||
}
|
Reference in New Issue
Block a user