Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var sleeveSize, frontSize float64
- fmt.Scanln(&sleeveSize)
- fmt.Scanln(&frontSize)
- sum := (sleeveSize * 2 + frontSize * 2) * 1.1 / 100
- var fabricTypes, tieOrNot string
- fmt.Scanln(&fabricTypes)
- fmt.Scanln(&tieOrNot)
- switch (fabricTypes) {
- case "Linen":
- sum *= 15
- case "Cotton":
- sum *= 12
- case "Denim":
- sum *= 20
- case "Twill":
- sum *= 16
- case "Flannel":
- sum *= 11
- }
- sum += 10
- if tieOrNot == "Yes" {
- sum *= 1.2
- }
- fmt.Printf("The price of the shirt is: %.2flv.\n", sum)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement