Advertisement
Sim0o0na

Untitled

Apr 16th, 2018
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 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 Moon
  8. {
  9.     class Program
  10.     {    
  11.         static void Main(string[] args)
  12.         {
  13.             double avrgSpeed = double.Parse(Console.ReadLine());
  14.             double fuel = double.Parse(Console.ReadLine());
  15.            
  16.             double totalDistance = 384400*2;
  17.             double totalTime = totalDistance/avrgSpeed;
  18.             totalTime = Math.Ceiling(totalTime);
  19.             double time = totalTime+3;
  20.             time = Math.Round(time);
  21.             double totalFuel = (fuel*totalDistance)/100.0;
  22.             Console.WriteLine (time);
  23.             Console.WriteLine (totalFuel);
  24.         }
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement