Advertisement
Spocoman

Change Bureau

Oct 4th, 2024
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.45 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     const BTCToBGN = 1168
  7.     const yuanToUSD = 0.15
  8.     const USDToBGN = 1.76
  9.     const BGNToEURO = 1.95
  10.    
  11.     var bitcoinCount, yuanCount, commision float64
  12.     fmt.Scanln(&bitcoinCount)
  13.     fmt.Scanln(&yuanCount)
  14.     fmt.Scanln(&commision)
  15.    
  16.     totalSum := (bitcoinCount * BTCToBGN + yuanCount * yuanToUSD * USDToBGN) / BGNToEURO * (100 - commision) / 100
  17.  
  18.     fmt.Printf("%.2f\n", totalSum)
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement