Advertisement
Spocoman

Annual Salary

Sep 29th, 2024 (edited)
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.67 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.   "bufio"
  5.   "os"
  6.   "fmt"
  7. )
  8.  
  9. func main() {
  10.     var experience int
  11.     fmt.Scanln(&experience)
  12.  
  13.     scanner := bufio.NewScanner(os.Stdin)
  14.     scanner.Scan()
  15.     specialty := scanner.Text()
  16.  
  17.     salary := 0.0
  18.  
  19.     switch specialty {
  20.     case  "C# Developer":
  21.         salary = 5400
  22.     case "Java Developer":
  23.         salary = 5700
  24.     case "Front-End Web Developer":
  25.         salary = 4100
  26.     case "UX / UI Designer":
  27.         salary = 3100
  28.     case "Game Designer":
  29.         salary = 3600
  30.     }
  31.    
  32.     if experience <= 5 {
  33.             salary -= salary * 0.658
  34.     }
  35.    
  36.     fmt.Printf("Total earned money: %.2f BGN", salary * 12)
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement