Advertisement
Guest User

TimeCalculator

a guest
Apr 26th, 2018
75
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.Numerics;
  3.  
  4. namespace TimeCalculator
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             BigInteger centuries = BigInteger.Parse(Console.ReadLine());
  11.             BigInteger years = BigInteger.Parse(Console.ReadLine());
  12.             BigInteger days = BigInteger.Parse(Console.ReadLine());
  13.             BigInteger hours = BigInteger.Parse(Console.ReadLine());
  14.             BigInteger seconds = BigInteger.Parse(Console.ReadLine());
  15.  
  16.            BigInteger LeapYears = ((seconds / (60 * 60 * 24 * 365) + hours / (24 * 365) + days / 365 + centuries * 100)+years)/4;
  17.            
  18.  
  19.             years = (centuries * 100) + years;
  20.             days = (years * 365) + days+LeapYears;
  21.             hours = (days * 24)+hours;
  22.             seconds = (hours * 360)+seconds;
  23.  
  24.             BigInteger miliSeconds = seconds * 1000;
  25.  
  26.             Console.WriteLine(miliSeconds);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement