Advertisement
Spocoman

Mining Rig

Sep 20th, 2023
773
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     double videosPrice, cablesPrice, powerPerDay, profitPerDay;
  8.     cin >> videosPrice >> cablesPrice >> powerPerDay >> profitPerDay;
  9.  
  10.     double computerPrice = (videosPrice + cablesPrice) * 13 + 1000;
  11.  
  12.     cout << computerPrice << endl
  13.         << ceil(computerPrice / ((profitPerDay - powerPerDay) * 13)) << endl;
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement