Guest User

Untitled

a guest
Sep 19th, 2016
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.27 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.  
  8.  
  9. namespace Exercise_1
  10. {
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             byte centuries = byte.Parse(Console.ReadLine());
  16.  
  17.  
  18.  
  19.             int years = centuries * 100;
  20.             ulong days = (ulong)(years * 365.2422);
  21.             ulong hours = 24 * days;
  22.             ulong minutes = 60 * hours;
  23.             ulong seconds = 60 * minutes;
  24.             ulong milliseconds = 1000 * seconds;
  25.             ulong microseconds = 1000 * milliseconds;
  26.             ulong nanoseconds = 1000 * microseconds;
  27.  
  28.  
  29.  
  30.             Console.WriteLine(centuries);
  31.             Console.WriteLine(years);
  32.             Console.WriteLine(days);
  33.             Console.WriteLine(hours);
  34.             Console.WriteLine(minutes);
  35.             Console.WriteLine(seconds);
  36.             Console.WriteLine(milliseconds);
  37.             Console.WriteLine(microseconds);
  38.             Console.WriteLine(nanoseconds);
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment