Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 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 Distance
  8. {
  9.     class Distance
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var a = double.Parse(Console.ReadLine());
  14.             var b = float.Parse(Console.ReadLine());
  15.             var c = float.Parse(Console.ReadLine());
  16.             var d = float.Parse(Console.ReadLine());
  17.            
  18.  
  19.             var pyrvo = a * (b / 60);
  20.             var vtoro = (a + (a * 0.1)) * (c / 60);
  21.             var treto = ((a + (a * 0.1)) - a * 0.05) * (d / 60);
  22.            var l = pyrvo + vtoro + treto;
  23.             Console.WriteLine("{0:f2}", l);
  24.  
  25.  
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement