Advertisement
iliqnvidenov

Untitled

Mar 30th, 2015
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 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. class Program
  8. {
  9.     static void Main()
  10.     {
  11.         int allDataToDownLoad = int.Parse(Console.ReadLine());
  12.         int priceForCinemaMovie = int.Parse(Console.ReadLine());
  13.         int wifeSpending = int.Parse(Console.ReadLine());
  14.         double downloadTime = (allDataToDownLoad / 2d);
  15.         downloadTime /= 60d;
  16.         downloadTime /= 60d;
  17.         double wifeSpendingsForDownloadTime = downloadTime * wifeSpending;
  18.         double moviesDownloaded = (allDataToDownLoad / 1500d);
  19.         double cinemaPrice = moviesDownloaded * priceForCinemaMovie;
  20.         if (wifeSpendingsForDownloadTime <= cinemaPrice)
  21.         {
  22.             Console.WriteLine("mall -> {0:f2}lv",wifeSpendingsForDownloadTime);
  23.         }
  24.         else
  25.         {
  26.             Console.WriteLine("cinema -> {0:f2}lv", cinemaPrice);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement