add: switch statement exercises
This commit is contained in:
@ -16,7 +16,8 @@ package main
|
||||
//
|
||||
// So, you've decided to write a program to do that for you.
|
||||
//
|
||||
// EXERCISE
|
||||
// EXERCISE: Richter Scale
|
||||
//
|
||||
// 1. Get the earthquake magnitude from the command-line.
|
||||
// 2. Display its corresponding description.
|
||||
//
|
@ -8,7 +8,8 @@
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Richter Scale #2
|
||||
//
|
||||
// Repeat the previous exercise.
|
||||
//
|
||||
// But, this time, get the description and print the
|
@ -13,7 +13,8 @@ import (
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Convert
|
||||
//
|
||||
// Convert the if statement to a switch statement.
|
||||
// ---------------------------------------------------------
|
||||
|
@ -12,8 +12,10 @@ package main
|
||||
// You want to write a program that will manipulate the
|
||||
// given strings to uppercase, lowercase, and title case.
|
||||
//
|
||||
// EXERCISE
|
||||
// EXERCISE: String Manipulator
|
||||
//
|
||||
// 1. Get the operation as the first argument.
|
||||
//
|
||||
// 2. Get the string to be manipulated as the 2nd argument.
|
||||
//
|
||||
// HINT
|
@ -15,7 +15,8 @@ import (
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Days in a Month
|
||||
//
|
||||
// Refactor the previous exercise from the if statement
|
||||
// section.
|
||||
//
|
@ -1,11 +1,11 @@
|
||||
# Header
|
||||
# Switch Statement
|
||||
|
||||
What you will learn?
|
||||
1. **[Richter Scale](https://github.com/inancgumus/learngo/tree/master/12-switch/exercises/01-richter-scale)**
|
||||
|
||||
1. **[text](https://github.com/inancgumus/learngo/tree/master/)**
|
||||
2. **[Richter Scale #2](https://github.com/inancgumus/learngo/tree/master/12-switch/exercises/02-richter-scale-2)**
|
||||
|
||||
text
|
||||
3. **[Convert](https://github.com/inancgumus/learngo/tree/master/12-switch/exercises/03-convert)**
|
||||
|
||||
2. **[text](https://github.com/inancgumus/learngo/tree/master/)**
|
||||
4. **[String Manipulator](https://github.com/inancgumus/learngo/tree/master/12-switch/exercises/04-string-manipulator)**
|
||||
|
||||
text
|
||||
5. **[Days in a Month](https://github.com/inancgumus/learngo/tree/master/12-switch/exercises/05-days-in-month)**
|
||||
|
Reference in New Issue
Block a user