-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
41 lines (37 loc) · 997 Bytes
/
main.go
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
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"fmt"
bank "github.com/kartik1112/bank-cli-tool-go.git/Bank"
)
func main() {
AccountBalance := 0.0
fmt.Println("***************************************************************************")
fmt.Println(" Bank Management")
fmt.Println("***************************************************************************")
exit := false
for exit != true {
var choice int
fmt.Println("1. Add Money")
fmt.Println("2. Withdraw Money")
fmt.Println("3. Check Balance")
fmt.Println("4. Exit")
fmt.Print("Enter your choice :")
fmt.Scan(&choice)
switch choice {
case 1:
bank.AddMoney(&AccountBalance)
fmt.Printf(`Balance Remaining : %v `,AccountBalance)
fmt.Println("")
case 2:
bank.WithdrawMoney(&AccountBalance)
fmt.Printf(`Balance Remaining : %v`,AccountBalance)
fmt.Println("")
case 3:
bank.ShowBalance(&AccountBalance)
case 4:
exit = true
default:
fmt.Println("Enter Valid Input !!!")
}
}
}