Advertisement
Spocoman

Change Bureau

Sep 16th, 2023
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     double bitcoinCount, yuanCount, commision, totalSum,
  8.         BTCToBGN = 1168, yuanToUSD = 0.15, USDToBGN = 1.76, BGNToEURO = 1.95;
  9.        
  10.     cin >> bitcoinCount >> yuanCount >> commision;
  11.  
  12.     totalSum = (bitcoinCount * BTCToBGN + yuanCount * yuanToUSD * USDToBGN) / BGNToEURO * (100 - commision) / 100;
  13.  
  14.     printf("%.2f\n", totalSum);
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement