Advertisement
Spocoman

PC Store

Sep 21st, 2023
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8.     double procesorPrice, videoPrice, ramPrice;
  9.     cin >> procesorPrice >> videoPrice >> ramPrice;
  10.  
  11.     int ramCount;
  12.     cin >> ramCount;
  13.  
  14.     double discount, USDToBGN = 1.57;
  15.     cin >> discount;
  16.  
  17.     double sum = ((procesorPrice + videoPrice) * (1 - discount) + ramPrice * ramCount) * USDToBGN;
  18.  
  19.     printf("Money needed - %.2f leva.\n", sum);
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement