forked from 200lab-Education/90DaysOfDevOps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday12_example3.go
More file actions
29 lines (20 loc) · 786 Bytes
/
Copy pathday12_example3.go
File metadata and controls
29 lines (20 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main
import "fmt"
func main() {
const DaysTotal int = 90
var remainingDays uint = 90
challenge := "#90DaysOfDevOps"
fmt.Printf("Welcome to the %v challenge.\nThis challenge consists of %v days\n", challenge, DaysTotal)
var TwitterName string
var DaysCompleted uint
// asking for user input
fmt.Println("Enter Your Twitter Handle: ")
fmt.Scanln(&TwitterName)
fmt.Println("How many days have you completed?: ")
fmt.Scanln(&DaysCompleted)
// calculate remaining days
remainingDays = remainingDays - DaysCompleted
fmt.Printf("Thank you %v for taking part and completing %v days.\n", TwitterName, DaysCompleted)
fmt.Printf("You have %v days remaining for the %v challenge\n", remainingDays, challenge)
fmt.Println("Good luck")
}