Advertisement
fbinnzhivko

Problem 01. Distance

Dec 21st, 2016
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace ConsoleApplication
  5. {
  6.     internal class Program
  7.     {
  8.         public static void Main(string[] args)
  9.         {
  10.             var first = int.Parse(Console.ReadLine());
  11.             var secound = int.Parse(Console.ReadLine());
  12.             var third = int.Parse(Console.ReadLine());
  13.             var four = int.Parse(Console.ReadLine());
  14.  
  15.  
  16.             var total = first*((double)secound/(double)60)+((double)first*1.1)*((double)third/(double)60)+((first*1.1)*0.95)*((double)four/(double)60);
  17.  
  18.             //Console.WriteLine(first*((double)secound/(double)60));
  19.             //Console.WriteLine(((double)first*1.1)*((double)third/(double)60));
  20.             //Console.WriteLine(((first*1.1)*0.95)*((double)four/(double)60));
  21.  
  22.             Console.WriteLine("{0:f2}",total);
  23.  
  24.  
  25.  
  26.  
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement