Advertisement
darighteous1

01. TorrentPirate

Mar 31st, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         double dataToDownload = double.Parse(Console.ReadLine());
  8.         double priceOfMovie = double.Parse(Console.ReadLine());
  9.         double wifeSpending = double.Parse(Console.ReadLine());
  10.         double downloadSpeed = 2.0;
  11.  
  12.         double downloadTime = dataToDownload / downloadSpeed / 3600;
  13.         double priceForDownload = downloadTime * wifeSpending;
  14.         double numberOfMovies = dataToDownload / 1500.0;
  15.         double cinemaPrice = numberOfMovies * priceOfMovie;
  16.  
  17.         if (priceForDownload > cinemaPrice)
  18.         {
  19.             Console.WriteLine("cinema -> {0:F2}lv", cinemaPrice);
  20.         }
  21.         else
  22.         {
  23.             Console.WriteLine("mall -> {0:F2}lv", priceForDownload);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement