Skip to content

aphill70/starter-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Exercise

Download this repo and open main.go inside a text editor. You need to add code to 3 places to complete the functions.

The function isOldest needs a few if statements to print the correct statement based on the scout passed in.

To test this function:

 go run main.go oldest <name>

The next function birthday needs a few if statements and a variable assignment to print the correct birthday based on the scout.

To test this function:

go run main.go birthday <name>

the final function age takes an argument for the operation to use so you need to use an if statement to choose the correct math operation and then assign the result to the result variable.

To test this function:

go run main.go age -sum
go run main.go age -average
go run main.go age -product

About

Simple CLI app for teaching some simple programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages