Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Threading.Tasks;
- namespace Centuries_to_Nanoseconds
- {
- class Program
- {
- static void Main()
- {
- int centuries = int.Parse(Console.ReadLine());
- int years = centuries * 100;
- ulong day = (ulong)(years*365.2422);
- ulong hours = day * 24;
- ulong minutes = hours * 60;
- ulong seconds = minutes * 60;
- ulong milliSeconds = seconds * 1000;
- BigInteger microSeconds = milliSeconds * 1000;
- BigInteger nanoSeconds = microSeconds * 1000;
- Console.WriteLine(
- "{0} centuries = {1} years = {2} days = {3} hours = {4} minutes = {5} seconds = {6} milliseconds = {7} microseconds = {8} nanoseconds",
- centuries,years,day,hours,minutes,seconds,milliSeconds,microSeconds,nanoSeconds);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement