Advertisement
Sim0o0na

Untitled

Apr 16th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             short gpuPrice = short.Parse(Console.ReadLine());
  14.             sbyte adapterPrice = sbyte.Parse(Console.ReadLine());
  15.             double electricityPrice = double.Parse(Console.ReadLine());
  16.             double grossIncomePerGpu = double.Parse(Console.ReadLine());
  17.  
  18.             double totalGpuPrice = gpuPrice * 13;
  19.             double totalAdapterPrice = adapterPrice * 13;
  20.             double totalSpent = totalAdapterPrice + totalGpuPrice + 1000;
  21.  
  22.             double netIncomePerGPU = grossIncomePerGpu - electricityPrice;
  23.             double totalNetIncPerGPU = netIncomePerGPU * 13;
  24.  
  25.             double daysToPayback = Math.Ceiling(totalSpent / totalNetIncPerGPU);
  26.  
  27.             Console.WriteLine(totalSpent);
  28.             Console.WriteLine(daysToPayback);
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement