Advertisement
Somo4k

01.Minig-Rig

Jun 10th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01._Mining_rig
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int priceVideoCard = int.Parse(Console.ReadLine());
  10. int priceCable = int.Parse(Console.ReadLine());
  11. double elPriceForDay = double.Parse(Console.ReadLine());
  12. double profitForDay = double.Parse(Console.ReadLine());
  13.  
  14. double totalVideoCards = priceVideoCard * 13;
  15. double totalCable = priceCable * 13;
  16. double moneySpent = totalCable + totalVideoCards + 1000;
  17. Console.WriteLine(moneySpent);
  18.  
  19. double totalProfitForDay = profitForDay - elPriceForDay;
  20. double totalProfit = totalProfitForDay * 13;
  21. double daysMoneyReturn = moneySpent / totalProfit;
  22.  
  23. Console.WriteLine(Math.Ceiling(daysMoneyReturn));
  24. }
  25. }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement